> For the complete documentation index, see [llms.txt](https://astral-protocol.gitbook.io/astral/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://astral-protocol.gitbook.io/astral/spatial-data-registry/celo-evm-anchored-spatial-data-registry/technical-design/validation.md).

# Validation

<figure><img src="https://327435336-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOlX2pSUdTM59utmjsi%2Fuploads%2FPEsIQeWy7goU6hB8tmhv%2Fvalidation.png?alt=media&amp;token=fbe2ee43-ef99-43b2-9269-1e5f62fc5227" alt=""><figcaption><p>Validation process highlighted</p></figcaption></figure>

The validation process, running under the 'validator' role, retrieves a requested number of unvalidated anchors, and for each one, retrieves the associated data points, recalculates the summary hash.&#x20;

The current counts and hash results are then compared to both the Celo contract and database counts and hash results established by the anchor process and any discrepancies are reported.

### Relevant code:

* [Validation endpoint](https://github.com/MRV-Studio/openmrv-server/blob/main/src/controller/validatorController.ts)
* [Validation service](https://github.com/MRV-Studio/openmrv-server/blob/main/src/service/validator.service.ts)
* [Contract service](https://github.com/MRV-Studio/openmrv-server/blob/main/src/service/contract.service.ts)
* [Celo Contract](https://github.com/MRV-Studio/openmrv-contract/blob/main/contracts/GeodataAnchor.sol)
* [Contract anchor and validation integration test](https://github.com/MRV-Studio/openmrv-server/blob/main/src/test/localnode.test.ts)
