Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: enable backwards validation #170

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

WIP: enable backwards validation #170

wants to merge 5 commits into from

Conversation

adiabat
Copy link
Contributor

@adiabat adiabat commented Jul 21, 2020

could be fun! Start at the tip, and work back to the genesis block

Still fails because the validation doesn't
RootSets will let ibd compare higher and lower verification results
and thus verify backwards.  Next I need to change verifyBatchProof
to take an empty set of roots and not worry about that
@adiabat adiabat changed the title enable backwards validation WIP: enable backwards validation Jul 22, 2020
@adiabat
Copy link
Contributor Author

adiabat commented Jul 22, 2020

The "easy" way would be for every udata to also include a rootSet of what the starting state of the accumulator should be. This is redundant for clients going forward since they already have it, and I think it's also redundant for clients going backwards. But -- it's simple to verify for the backwards clients.

It seems there's also a fancier version where the backwards clients figure this out without any hints from the server, but I need to figure out how that works. For example, in blocks with no proofs (empty blocks which don't consume any utxos but just reward the miner), you need to defer linking up the rootSets, as you know what to add (the miner utxo) but there's nothing to remove and no proofs to verify.

@dergoegge
Copy link
Contributor

We are already distingushing between backwards and forwards clients so sending the rootsets to backwards clients only would also work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants