not approved
Using a Decentralized Web Node (DWN) to implement an off-chain orchestration engine for long running, concurrent and asynchronous transactions, thus providing integration between Prism, Lace and Smart Contracts.
Current Project Status
Unfunded
Amount
Received
₳0
Amount
Requested
₳75,000
Percentage
Received
0.00%
Solution

Use Petri Nets (CPNs) to design and implement custom interfaces for DWN’s to ensure correct concurrent behaviour, data flow, resource management of DApps utilising Storage, Hooks and Orchestration.

Problem

Multi-step long-running interactions between peers requires a stateful context per participant where State is comprised of Identity, Tokens and Personal Data. DApp(s) are executed as steps in a Flow

Impact / Alignment
Feasibility
Value for money
Using a Decentralized Web Node (DWN) to implement an off-chain orchestration engine for long running, concurrent and asynchronous transactions, thus providing integration between Prism, Lace and Smart Contracts.

Please describe your proposed solution.

We propose to implement a Decentralized Web Node as specified by DIF. Over and above the standard features of Record storage and Hooks, this implementation will serves as a "Decentralized Service Bus" for building modular DApp's allowing developers to achieve High Cohesion and Loose Coupling.

It will facilitate the creation and execution of business process workflows that utilises:

  • Autonomous Decentralised Identities (DID) that provides Authentication, Authorisation and Non-repudiation to Individuals (SSI), Organisations (DAOs) and Things (IoT)
  • Secure Asynchronous Communication using DIDComm
  • Tokenisation of assets based a standardised taxonomy that provides a composable blockchain agnostic token framework work creation and transfer of tokenised assets, commodities and attestations.
  • Stateful orchestration of workflows, expressed as Coloured Petri-Nets

How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?

It will provide an integration platform between Prism, Lace and Cardano DApps, through an orchestration layer for long running concurrent and asynchronous transactions. The above environments for Identity, Tokens and Smart contracts are siloed and operate in a mostly synchronous modes. To facilitate better integration will require a state engine to track the interactions of peers in a multi-party dApp, comprised of multi-step processes flows incorporating wallets, smart contracts and personal data.

Coloured Petri Nets will be used a tool to design and implement custom protocols for decentralised web nodes according to application specifications. It provides well structured approach with a rigorous foundation for understanding and reasoning about the behaviour of the protocol, ensuring that it exhibits the desired properties and operates correctly in a concurrent environment.

  1. Requirement analysis: Start by gathering and documenting the requirements of your custom protocol. This includes understanding the desired functionality, performance goals, security measures, and any other relevant aspects.
  2. Petri Net modelling: Develop a Petri Net model (or a Coloured Petri Net model, if data types are involved) that captures the behaviour of your custom protocol. Model the states, transitions, and arcs to represent the protocol's operations, data flows, and control flows. This step will help you to visually and formally describe the concurrent processes involved in your protocol.
  3. Protocol validation: Analyse the Petri Net model to ensure that it meets the desired properties, such as liveness, boundedness, and reachability. This analysis will help you identify potential issues or inefficiencies in your protocol design, allowing you to refine the model as needed.
  4. Protocol implementation: Once the Petri Net model is validated, use it as a blueprint for implementing your custom protocol. Translate the model's components (places, transitions, and arcs) into appropriate data structures, algorithms, and functions in your chosen programming language. Ensure that the implementation follows the concurrency rules and data flow constraints defined in the Petri Net model.
  5. Testing and verification: Test your implemented protocol against various scenarios and edge cases to ensure that it behaves as expected. You can also use formal verification techniques to prove the correctness of your implementation, especially in critical systems where reliability is crucial.
  6. Deployment and integration: Deploy your custom protocol within the decentralised web nodes and integrate it with the other components of your system. Monitor the performance and behaviour of your protocol in real-world conditions to ensure that it meets the requirements and expectations.

Petri Nets are more concise than other process flow descriptions (like UML or BPMN) in that they have an exact mathematical definition of their execution semantics, with a well-developed mathematical theory for process analysis. Bounded Petri Nets exhibits Categorical Semantics in the way that concatenable processes as strict Monoidal categories, model Net computations.

How do you intend to measure the success of your project?

  1. A business analyst should create a dApp Protocol specification by providing a Coloured Petri Net joining Places (States) and Transitions with Arcs specifying the flow of the dApp - i.e. describing a flow that requires Verifiable Credentials provided by Prism, Ada and tokens from Lace and execution of Smart Contract on Cardano.
  2. The Peri Net is encoded as a JSON/HOCON configuration a provided to the DWN instances that will implement the protocol
  3. The DWN instance will programmatically create REST and GRPC endpoints for a specific instance of a dApp for invocation by a transacting peer.
  4. The State of each P@P interaction will be maintained for the duration of the dApp execution (asynchronous and long running)
  5. Verification of dApp flow can be done by rendering the JSON/HOCON configuration back as a Petri Net, which in turn can be validated in terms of in terms of Liveness, Boundedness and Reachability

Please describe your plans to share the outputs and results of your project?

Decentralized Web Nodes has become a vital component of the Web3 /Web5 ecosystem along with Token Wallets - Lace, Identity Wallets - Prism, Decentralized Exchanges and Smart Contracts. It aims to provide data storage beyond what is provided by wallets, along with Hooks (Async Messaging Queue for Pub/Sub), Secure Communication (DIDComm) and Access Control (Authentication and Authorisation). It is also extendable by adding custom interfaces that allows a runtime for DApps, from simple sharing of contacts, events and playlist to more complex peer to peer trading in a Decentralized Marketplace. DIDx has an implementation of a DWN - aptly called D@WN in which we shall provide the runtime for orchestration as described above allowing the project to be tested against a POC scenario (workflow).

What is your capability to deliver your project with high levels of trust and accountability?

We have already developed an open source Coloured Petri Net implementation for Scala 3. We can demonstrate it working in an abstract use case. We have a excellent team of developers and SRE's that has developed and deployed a Cloud API for Sovrin/Indy Verifiable Credentials and is used in production by a UN sponsored project Yoma where African youth across the continent can build a reliable CV that will assist them in finding jobs.

What are the main goals for the project and how will you validate if your approach is feasible?

In terms of Cardano's the conceptual view of a multi-step Smart Contract , we shall provide an off-chain orchestration engine running in a Decentralised Web Node: "the off-chain component will need to be able to look at the locked uTXO and decode its datum to see which state the contract is currently in, so that it can correctly generate a transaction for either unlocking the utxo or driving the contract forward." It will also allow strong verification of Identity of participants in the transaction though integration with Prism.

Please provide a detailed breakdown of your project’s milestones and each of the main tasks or activities to reach the milestone plus the expected timeline for the delivery.

  1. Define a use-case that will sufficiently show the orchestration and integration of IOG products (Cardano, Prism and Lace) - 2 weeks
  2. Encode the use case as Coloured Petri Net - 1 week
  3. Define the interfaces with Cardano Smart Contracts, Prism and Lace satisfying the requirement of the use case - 4 weeks
  4. Implement the interfaces and workflow in the PetriRunner (runtime) implemented as a DWN protocol - 6 weeks
  5. Demonstrate - 1 week

Please describe the deliverables, outputs and intended outcomes of each milestone.

  1. Documented use case
  2. Petri Net of the above
  3. Interface specification (as provided by Lace, Prism and Cardano)
  4. REST/GRPC implementation of the interfaces form 3
  5. A standalone implementation of a Web Node executing the above and integrating with the IOG systems

Please provide a detailed budget breakdown of the proposed work and resources.

Image file

Who is in the project team and what are their roles?

Ian de Beer - team lead Petri Net, implementation - Scala developer

Lohan Spies - Business Analyst and Prism specialist

Mourits de Beer - Developer (Prism, Cardano and Lace) - Scala Developer

Henry Msiska - Developer DWN infrastructure - SRE and Scala Developer

How does the cost of the project represent value for money for the Cardano ecosystem?

This project will provide a development methodology and execution runtime that will allow DApp developers with scalable, reliable and intuitive integration path to the Cardano ecosystem.

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00