# Updater contract

The protocol for the updater contract is specified as:

<figure><img src="/files/jd1sKhDdYDNhQ8pfqYKG" alt=""><figcaption></figcaption></figure>

The updater contract maintains the light client’s internal state including a list of block headers of 𝒞1 in headerDAG. It has two publicly exposed functions. The HeaderUpdate function can be invoked by any block header relay node, providing supposedly the next block header and a proof as input. If the proof verifies against the current light client state LCS and blkH𝑟−1, the contract will do further light-client checks, and then the state will be updated accordingly. Since the caller of this function must pay a fee, DoS attacks are naturally prevented.

The GetHeader function can be called by receiver contracts to get the block header at height 𝑡. Receiver contracts can use the obtained block header to finish application-specific verification, potentially with the help of a user or some third party.


---

# 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://docs.zkbridge.com/zkbridge-trustless-cross-chain-bridges-made-practical/updater-contract.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.
