Assessment reports>ZetaChain>Threat Model>Message: AddBlockHeader

Message: AddBlockHeader

The AddBlockHeader message handler is used to add a new block header into the store. It initiates ballot voting for the block header in question, using the hash of the message as the ballot index.

Once the block header has been sufficiently voted on, it ensures the following:

  1. The block header does not already exist in the store.

  2. The block header timestamp is valid.

    • For Ethereum, no validation is necessary.

    • For Bitcoin, it checks the timestamp precision and ensures it is not more than two hours into the future compared to ZetaChain's time.

  3. The block header's parent hash must not be nil.

It then finally inserts the new block header into the store.

Zellic © 2024Back to top ↑