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

Performance of Poseidon #3

Closed
kevaundray opened this issue Aug 5, 2019 · 2 comments
Closed

Performance of Poseidon #3

kevaundray opened this issue Aug 5, 2019 · 2 comments

Comments

@kevaundray
Copy link
Collaborator

kevaundray commented Aug 5, 2019

Multiplying by MDS Matrix in the Constraint system

Currently, proof generation takes more than 60 seconds, when we use the prescribed parameters:

  • Partial Rounds: 59
  • Full Rounds: 8
  • Width: 9

I believe I have tracked it down to the Matrix multiplication segment. Adding two LC's concatenates both vectors together. The matrix multiplication by a vector of a 9x9 matrix will produce at least 81 terms in the Linear combination.

The multiplication is done (Partial_rounds+Full_rounds) times so we have at least 72 * 81 = 6237 terms.

This would be the minimum assuming that we started with each LC having one term.

@kevaundray
Copy link
Collaborator Author

kevaundray commented Aug 13, 2019

Multiplying by MDS Matrix in the Constraint system

Adding the simplify method seems to have sped this up and we are now able to use the prescribed amount of rounds. Will keep it open, once extensive tests are ran, confirming that this is no longer a problem

@kevaundray
Copy link
Collaborator Author

kevaundray commented Aug 16, 2019

Performance results on the constraint system

Statement : "Given y, I know the pre-image x such that y = h(x)" where h is the poseidon hash function.

Proving time is 222.996317ms
Verification time is 73.399651ms

Benchmark can be simulated on the following branch: https://github.com/dusk-network/Hades252/tree/bench_pre_image

To prove the blind bid statement that we use in the consensus:

Proving time is 854.326017ms
Verification time is 284.990527ms

Benchmark can be simulated on the following branch: https://github.com/dusk-network/Hades252/tree/bench_blindbid

CPU : 2.2 GHz Intel Core i7

@kevaundray kevaundray changed the title Performance: Multiplying by MDS Matrix in the Constraint system Performance of Poseidon Aug 16, 2019
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

No branches or pull requests

1 participant