> For the complete documentation index, see [llms.txt](https://docs.minervachain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.minervachain.org/protocol/architecture.md). Agents can also search and read this documentation through its [MCP server](https://docs.minervachain.org/~gitbook/mcp).

# Architecture

Minerva is a fork of CoreGeth, the Ethereum-classic lineage of go-ethereum, with four additions that are active from block 0 on every Minerva network. Everything else, from the EVM to the JSON-RPC surface, is standard Ethereum.

## Layers

| Layer            | What it is                                                                                                                                                    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Node             | `minerva-geth`, a CoreGeth-family Proof-of-Work client. Ethash sealing, EIP-1559 fees, full Ethereum JSON-RPC plus a `minerva` namespace.                     |
| Precompiles      | `0x…4D00` verifies ML-DSA-65 signatures; `0x…4D01` exposes the context of the native transaction being executed.                                              |
| System contracts | Installed at genesis at `0x…0201` to `0x…0205`: security mode registry, readiness registry, account factory, account control registry, migration reserve.     |
| Bridge contracts | Installed at genesis at `0x…0301` to `0x…0303`: message registry, ML-DSA-65 guardian verifier, native bridge vault.                                           |
| Accounts         | `MinervaAccount` contracts at deterministic `CREATE2` addresses, each controlled by an ML-DSA-65 key.                                                         |
| Services         | PQ relayer (a raw-transaction gateway), indexer, explorer, Blockscout, bridge relayer and indexer. None of them holds a signing key that can move user funds. |
| Clients          | Minerva Wallet (extension, mobile, desktop), the TypeScript SDK, and any EVM tooling for reads.                                                               |

## The four consensus rules

Each is a chain-config fork activated at block 0:

1. **`minervaNativeOnly`.** Blocks may contain only type `0x4D` transactions. A block with a legacy `0x00`, `0x01` or `0x02` transaction is invalid on every node, whatever a miner's local policy.
2. **`minervaMLDSA65Precompile`.** The verifier at `0x…4D00` is available to contracts and used by the node for sender derivation.
3. **`minervaAccountControl`.** Before charging gas, the node checks the sender's record in the account control registry: the key commitment, algorithm and policy version must match. Rotated-out keys are rejected at transaction admission and in block validation.
4. **`minervaEmission`.** The block reward schedule (1 MRV halving every 10,500,000 blocks) and the 30/70 base-fee split between the miner and the burn.

## No EOA anywhere

The rule that shapes everything: every externally visible account on a Minerva network is a Minerva account. That includes the miner reward recipient (the `etherbase` is only an address, it needs no key on the server), the bridge admin, relayer and guardians, and the faucet treasury on the testnet. Services that used to need a gas-paying EOA on other chains, such as a relayer or a faucet, are either PQ signers themselves or plain forwarders of bytes the user already signed.

## What a transaction looks like

```
wallet signs MinervaPQTxV1 (ML-DSA-65, context MINERVA_PQ_TX_V1)
   │
   ├─ eth_sendRawTransaction / minerva_sendRawPQTransaction  (any node)
   └─ POST /pq-dev/send-raw                                  (public relayer, same thing over HTTPS)
          │
          ▼
node: decode 0x4D → verify ML-DSA-65 → derive sender = account address
      → check account-control record → charge gas to the account → execute
```

The sender is the smart account from the first transaction, even before the account contract exists. See [Post-quantum accounts](https://docs.minervachain.org/protocol/pq-accounts.md) and [The native transaction](https://docs.minervachain.org/protocol/native-transaction.md).

## Repositories

| Repository                                                           | Contents                                                                           |
| -------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [minerva-network](https://github.com/MinervaQuantum/minerva-network) | the node, system contracts, SDK packages, devnet and launch tooling, services      |
| [minerva-bridge](https://github.com/MinervaQuantum/minerva-bridge)   | bridge contracts for both chains, relayer, indexer, monitor, web app               |
| [minerva-wallet](https://github.com/MinervaQuantum/minerva-wallet)   | mobile, extension and desktop wallets and their shared packages                    |
| [minerva](https://github.com/MinervaQuantum/minerva)                 | programme documents: supply statement, bridge accounting specification, these docs |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.minervachain.org/protocol/architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
