I'm reading the IOTA documentation, but I'm still having a doubt: is the Tangle a graph where each vertex is a transaction or is each vertex a message?
Thanks.
I guess depends on the documentation you are reading. Last version of official wiki states the following:
A message is an object that nodes gossip around in the network. It always references one to eight other messages, which are known as parents. It is stored as a vertex on the Tangle data structure maintained by the nodes.
...
Previously, the IOTA protocol used transactions (which were vertices in the Tangle), where each transaction defined either an input or an output. A grouping of those input/output transaction vertices made up a bundle that transferred the given values as an atomic unit. But this approach was seen as too time-consuming. So, we adopted a new transaction structure called the unspent transaction outputs (UTXO).
Also, it should be noted that there are different types of message payloads and one of them is called: Transaction payload.
Additionally, from the Tangle section of the wiki.
The Tangle is a network of parallel processed messages. These parallel messages form the "front" of the Tangle and offer multiple points for newly issued messages to attach to. There are no block producers, and it is enough to issue your transaction to any node so it would wrap it into a message and attach it to the Tangle.
IOTA is a leaderless protocol. Multiple nodes attach multiple transaction messages to multiple points of the Tangle at the same time. IOTA has no bottlenecks, no middlemen, and no fees.
Finally, take a loot at the Generalization of the Tangle transaction concept TIP, which states:
The Tangle is the graph data structure behind IOTA. In the current IOTA protocol, the vertices of the Tangle are represented by transactions. This document proposes an abstraction of this idea where the vertices are generalized messages, which then contain the transactions or other structures that are processed by the IOTA protocol. Just as before, each message directly approves other messages, which are known as parents.
The messages can contain payloads. These are core payloads that will be processed by all nodes as part of the IOTA protocol. Some payloads may have other nested payloads embedded inside. Hence, parsing is done layer by layer.
Hope it helps!