# Transactions

Transactions (txns) are also called [commands](/z_glossary/commands.md) or events.

A txn is generated by a [back\_end\_actor](/z_glossary/back_end_actor.md) or [blockchain\_listener](/z_glossary/blockchain_listener.md) and executed in a [state\_machine\_actor](/z_glossary/state_machine_actor.md) to update the [state](/z_glossary/state.md).

A txn is the only outside trigger that's able to change the [state](/z_glossary/state.md). In other words, all state changes are triggered by txn(s).

## Some examples of txns

Alice sends 10T to Bob. This is a transfer txn. Every 1000 blocks, we run a clean up of the blockchain storage. This is a [blockchain\_listener](/z_glossary/blockchain_listener.md) triggered txn. It looks like a cron job. If the blockchain notices a new TApp is created, then it performs a **generate tapp account** task. Although this is also a [blockchain\_listener](/z_glossary/blockchain_listener.md) triggered txn, it's not considered to be like a cron job.

## Binary successful or failed on execution

A txn can be successfully executed or failed. If it's successful, it may or may not change the state. But if it's failed, it will definitely **NOT** change the state.

There are **no partially successful txns**. They're either fully successful or totally failed.


---

# 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://dev.teaproject.org/z_glossary/txn.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.
