Skip to content

Add ProvenBlock::validate() and use it in read_from() #2080

@sergerad

Description

@sergerad

Based on comment:

Validating a signature should be relatively cheap, but I'm assuming this will happen within BlockHeader itself (since the signature will be in the block header).

Validating the rest would be relatively expensive:

Verifying the ZKP itself will probably be 10 - 20 ms.
We'll also need to compute the output note tree root, transaction commitment, account update commitment, and nullifier commitment. Depending on the number of transactions and their complexity, this could also be pretty significant (probably also on the order of 10 - 20 ms - though, would be good to test this at some point).
Not in this PR, but we should probably add ProvenBlock::validate() method to make sure the structure is consistent. Let's create an issue for this (unless we have one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions