# Messages

All state, besides the actual datasets, is being stored as **messages** on Aleph.

They are being posted by authorized entities (see [Programs](/technical-overview/nodes.md)), contain crucial information about datasets, their owners' given permissions and can be amended. They can be found in the [Message Explorer](https://explorer.aleph.im/messages?channels=FISHNET_TEST) as POST messages of different **types.**

## Types of Messages

The currently deployed Fishnet Data Model can be found [here](https://github.com/yourtrading-ai/fishnet-vm/blob/main/examples/fishnet_cod/src/fishnet_cod/model.py).

### Timeseries

Smallest targetable unit of a dataset. Has a name, owner, description and can be toggled to be available or not.

### Dataset

Consists of one or multiple Timeseries items and also has a name, owner and description, but the owner of the dataset is not necessarily the owner of all Timeseries! This way, you can build your own Dataset from Timeseries items of other users.

### Algorithm

Contains a piece of Python code that can be executed on Fishnet Executor Nodes. Has a name, owner and description, and a list of *Executions* that utilize this Algorithm.

### Execution

Refers to a Dataset and an Algorithm, which should be executed together, as requested by a user. May also contain additional parameters to influence the Algorithm's behavior. It has a state that may be:

* `REQUESTED` - Awaits Permission(s) from some of the Timeseries' owners.
* `PENDING` - All Permissions are granted and is awaiting execution.
* `DENIED` - At least one data owner refused permission.
* `RUNNING` - At least one executor node is currently running its algorithm.
* `SUCCESS` - All executors successfully finished running the algorithm and posted Results.
* `FAILED` - Fishnet failed to get valid results from every executor.

### Permission

Each user attempting to use another user's Timeseries data needs to have Permission for it first. This permission can be bound to a specific Algorithm to be executed with this Timeseries and may also be limited in the number of times it may execute. There are the following states:

* `REQUESTED` - Permission has been requested by the `requestor`
* `GRANTED` - Permission has been granted by the `owner`
* `DENIED` - Permission has been denied

Each Permission item tracks how often it has been used to grant access to a Timeseries during Execution.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fishnet.tech/technical-overview/messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
