secp256k1-zkp icon indicating copy to clipboard operation
secp256k1-zkp copied to clipboard

aggsig verify: inefficiently allocation every time

Open garyyu opened this issue 6 years ago • 1 comments

https://github.com/mimblewimble/secp256k1-zkp/blob/master/src/modules/aggsig/main_impl.h#L498-L499

    /* just going to inefficiently allocate every time */
    secp256k1_scratch_space *scratch = secp256k1_scratch_space_create(ctx, 1024*4096);

Mark here: This line need an optimization, to avoid 4M bytes RAM allocation on each call. Will give a PR on this.

garyyu avatar Sep 26 '18 06:09 garyyu

Another place: https://github.com/mimblewimble/secp256k1-zkp/blob/master/src/modules/aggsig/main_impl.h#L566

    scratch = secp256k1_scratch_space_create(ctx, 1024*4096);

garyyu avatar Sep 26 '18 12:09 garyyu