> For the complete documentation index, see [llms.txt](https://docs.extrachain.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.extrachain.io/exconsensus/block-merge-algorithm-bma.md).

# Block Merge Algorithm (BMA)

Block Merge Algorithm (BMA):

If BMA is started, then one or more blocks in local blockchain can be corrupted or incomplete. Also, new block can have malicious data. Thus, approver must make deep scan of block data.

1. Compare received and old block data.
   1. If data hash is different – compare block data and detect new transactions.
   2. If there are no new transactions:
      1. And previous block hash is same – drop received block.
      2. And previous block hash is different – stop BMA and start BPA;
2. Check detected transactions with TVA. If transactions pass TVA, new block with added transactions is produced and distributed.

New block can trigger chain of BMA calls to make consistent chain for each network unit.

![Block Merge Example](/files/-Ma2xc7WOikNlM4KY16p)

![BMA Scheme](/files/-Ma2xraxqUsuDC9e000K)


---

# 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 dynamically by asking a question.

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

```
GET https://docs.extrachain.io/exconsensus/block-merge-algorithm-bma.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.
