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

Ensure parameters match in the peer protocol. #409

Closed
nathan-at-least opened this issue Nov 4, 2015 · 3 comments
Closed

Ensure parameters match in the peer protocol. #409

nathan-at-least opened this issue Nov 4, 2015 · 3 comments
Labels
A-consensus Area: Consensus rules C-future-proofing Category: Changes that minimise the effects of shocks and stresses of future events. in 1.0 special to Nathan zkSNARK Multiparty Computation zkSNARK Parameter Deployment

Comments

@nathan-at-least
Copy link
Contributor

If a node joins a network but is using different zkSNARK circuit params, in the current codebase, I believe the peer protocol level won't notice this and then some nodes will fail other nodes' proofs.

A simple way to handle this is to bake in the hash of the parameters into the genesis block because the genesis block is already hardwired into nodes and the peer protocol (and there are different ones with different parameters: eg: prod network, testnet, localtest, etc...).

I added future proofing because we've discussed being able to migrate parameters long term. In that case we would need a way to do this "parameter agreement" as new parameters are introduced. One question is: if we use the "bake-it-in-the-genesis method" I described above, would this preclude any of our brainstormed parameter migration strategies?

@nathan-at-least
Copy link
Contributor Author

A related issue for transmission of the parameters (and maybe in-memory representation) is the serialization size. From spot checks of the serialized format, it appears to be whitespace separate decimal integers. So bzip2 should provide some widely deployed low-hanging fruit for cutting down on transmission size.

It's easy to imaging a different compact binary serialization, which would be more coding effort, but may also improve loading time. I don't know if that's at all an issue though.

@ebfull
Copy link
Contributor

ebfull commented Nov 9, 2015

I had a thought over the weekend about this: we could also include it in the "commitment tree" as, perhaps, the first element. I don't know what we'd gain over doing this instead of modifying the genesis block. It may make sense if we change the parameters and need to maintain multiple commitment trees.

@daira
Copy link
Contributor

daira commented Mar 22, 2016

The peer protocol already has an identifier that would prevent any confusion here. Also, it would be a fork because blocks that would verify with one set of parameters wouldn't verify with the other.

@daira daira closed this as completed Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Area: Consensus rules C-future-proofing Category: Changes that minimise the effects of shocks and stresses of future events. in 1.0 special to Nathan zkSNARK Multiparty Computation zkSNARK Parameter Deployment
Projects
None yet
Development

No branches or pull requests

3 participants