-
Notifications
You must be signed in to change notification settings - Fork 31
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
Memory management : pari_init #30
Comments
I test Wes19 VDF using https://github.com/KZen-networks/class/blob/2a8fa3bb58a2c177ccb1a429887d680988580b68/src/primitives/vdf.rs#L158 When changing |
What is the error you get? |
by running
I get
sometimes I get
and sometimes
so it seems it's not because of using 10 for t. Because rerunning it with 10 these errors may still occur. |
gmp_classgroup in https://github.com/poanetwork/vdf works quites stably. I am thinking following the simplicity in https://github.com/KZen-networks/class/blob/master/src/primitives/vdf.rs, but switch to their |
or maybe https://github.com/cambrian/accumulator/blob/master/src/group/class.rs |
|
TBH, POA's seems more modular and easier to pull out. Besides, POA's should be more efficient: they use GMP whereas Cambrian uses rug::Integer. |
ok, lets go with POA first ! |
At the moment,
pari_init
is called with constant 1Mb of stack memory for each function that requires the binding to class group function.optimize 1: remove
pari_init
when unnecessaryoptimize 2: minimize allocated stack size
optimize 3: Make the stack size dynamic based on inputs.
The text was updated successfully, but these errors were encountered: