> For the complete documentation index, see [llms.txt](https://litepaper.fiammalabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://litepaper.fiammalabs.io/solution-overview/general-flow/for-non-programmable-blockchains.md).

# For Non-Programmable Blockchains :

<figure><img src="https://2966001276-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0jUvtZ31Mvk6bUIbtlx%2Fuploads%2Fgit-blob-65a78be9244200066191abfdc3ff9b989e9360a5%2Fimage%20(2).png?alt=media" alt=""><figcaption><p>Fig2. The general flow of applications on Bitcoin</p></figcaption></figure>

#### Components Involved:

1. **Fiamma:** The core network handling the verification of ZKPs.
2. **Data Availability (DA) Layer:** Stores proof-related data securely.
3. **Bitcoin:** Executes scripts to verify data and signatures.
4. **Various ZKP Systems:** Includes Fflonk, Boojum, Stark, and others.

#### Steps:

#### Step 1: Proof Generation and Submission

* **ZKP Systems (Fflonk, Boojum, Stark, etc.):**
  * Various ZKPs are generated by different systems and submitted to the Fiamma network.
* **Fiamma:**
  * **Generate Schnorr Signature:** Fiamma generates a Schnorr signature which includes `data_hash`, `proof_hash`, `result`, and `new_state`.

#### Step 2: Storing Data in DA Layer

* **Fiamma to DA Layer:**
  * **Send Data:** Fiamma sends the transaction data (`txdata`), proof, and result to the DA layer for storage.
* **DA Layer:**
  * **Store Data:** The DA layer securely stores the received data ensuring its availability and integrity.

#### Step 3: Retrieving Data from DA Layer

* **DA Layer to Bitcoin:**
  * **Send Tuple Data:** The DA layer sends a tuple of data (`tuple_data{data_hash, proof_hash, result, new_state}`) to Bitcoin for further verification.
* **Bitcoin:**
  * **Check Script:** Bitcoin executes scripts to verify the data and signatures.

#### Step 4: Verification on Bitcoin

* **Bitcoin Scripts:**
  * **Check Script Execution:** The scripts on Bitcoin perform checks on `DA Check` and `Sig Check` to verify the data and signatures.
  * **Final State Update:** Once the checks are successful, the final state is updated on the Bitcoin network.

#### Step 5: Kick off Transaction

* **Fiamma:**
  * **Kick off Transaction:** If necessary, Fiamma initiates the transaction based on the verified data and results.
