> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockx.chaintable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EVM computation model

> Connect block context, state, events, contract calls, and derived results.

EVM-native computation starts with a chain and block context, consumes state or event data, and produces derived results. BlockX connects these data semantics to function execution through Call Builders, runtime reads, and Writer Plugins.

## Chain and block context

| Context | Where you provide it | What it selects |
| - | - | - |
| Trigger block | `BlockTableCallConfig` | Source rows for one block |
| Function read context | Function arguments, then `EVM(chain_id, block_id)` or a table read | The chain or table state queried by that operation |
| Output block | `BlockTableWriteHandler` | The target block associated with the write |
| Historical partition | `BlockBundleCallConfig` | A bundle of source rows |

Keep these contexts aligned with the computation you intend. A bundle contains multiple heights; if each row requires historical state, derive the read context from the source data. A bundle number is not a block identifier.

## State, events, and dependencies

| Data | Role in a computation |
| - | - |
| State | A value associated with an entity at a block, such as an account balance or contract storage |
| Event | A record of something that happened, used as input to a derived computation |
| Trigger rows | Rows expanded by the Call Builder into function arguments |
| Dependency reads | Additional state or table data that the function queries while processing an input |

BlockDB exposes table data. EVM node capabilities provide account state and contract queries. Choose which source answers each question in your function.

## Function calls and contract calls

| Term | Meaning |
| - | - |
| BlockX Call | One invocation of your Python function |
| EVM contract call | A contract query performed inside that function through node access |
| Sub-function call | An invocation of another registered BlockX function |

One BlockX Call can read state and make several contract calls. Python Executor runs the user function; the node capability executes the EVM query and returns its result through the Worker IO path.

## Follow the data

```mermaid theme={null}
flowchart LR
    block["Chain and block context"] --> input["State and event inputs"]
    input --> fn["BlockX function computation"]
    reads["State reads and contract calls"] --> fn
    fn --> output["Derived records or returned values"]
    output --> ready["Confirm completion before consumption"]
```

* New-block processing selects one trigger block and its output context.
* Historical backfill selects a source bundle and the corresponding output partition.
* The caller controls submission and downstream readiness checks.

## Summary

* Carry the intended chain and block through input, reads, and output.
* Distinguish a BlockX Call from an EVM contract call.
* Confirm storage completion separately from function execution.

Continue reading:

* [Write EVM data functions](/guides/write-functions)
* [Compute per block](/guides/block-computation)
* [Backfill historical bundles](/guides/bundle-backfill)
* [Execution semantics and results](/concepts/execution-semantics)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.