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

Pot verification preparation #1900

Merged
merged 10 commits into from
Aug 30, 2023
Merged

Pot verification preparation #1900

merged 10 commits into from
Aug 30, 2023

Conversation

nazar-pc
Copy link
Member

This is a preparation for PoT verification since a few consensus parameters were missing and information in the header wasn't sufficient.

For example we didn't have expected number of PoT iterations in consensus and corresponding number of iterations in the header to facilitate initial stateless PoT verification. I'm not excited that we have to add iterations into the header, but at the same time otherwise all PoT verification will be delayed to block import time.

PreDigestPotInfo is an enum as well, currently it has just one variant Regular that means no entropy injection and no adjustment of number of iterations happened yet. Once we have either of those, second enum variant will be added to handle those cases.

Since we no longer need to be compatible with Gemini 3f I have done some breaking refactoring like making PreDigest an enum to facilitate future protocol upgrades.

I have set number of PoT iterations to what my machine can do for Gemini network and lower numbers such that it takes ~1s on other machines (roughly), workaround with sleep is removed and no longer necessary since PoT is doing actual work now.

There is still a lot of work left, but we're already cleaning up some TODOs.

Code contributor checklist:

@nazar-pc nazar-pc force-pushed the pot-verification-preparation branch from 499639d to d819d2c Compare August 29, 2023 19:32
@nazar-pc
Copy link
Member Author

Rebased on main and pushed one more commit on top since no one reviewed this yet.

…us log items instead for stateless verification purposes, prepare for future extension for entropy injection into seed too
@nazar-pc nazar-pc force-pushed the pot-verification-preparation branch from d819d2c to 24d77ed Compare August 29, 2023 19:55
Copy link
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense overall. Left some questions

crates/subspace-proof-of-time/src/aes.rs Show resolved Hide resolved
crates/pallet-subspace/src/lib.rs Show resolved Hide resolved
crates/subspace-node/src/chain_spec.rs Outdated Show resolved Hide resolved
crates/sc-proof-of-time/src/source.rs Show resolved Hide resolved
@nazar-pc nazar-pc merged commit 99a2342 into main Aug 30, 2023
9 checks passed
@nazar-pc nazar-pc deleted the pot-verification-preparation branch August 30, 2023 12:13
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