dedis / cothority

Scalable collective authority
Other
426 stars 106 forks source link

Find skipchain IDs faster #2375

Closed ineiti closed 4 years ago

ineiti commented 4 years ago

The current way of finding the skipchain IDs is to go through all blocks. As the network.Decode is very slow if points need to be decoded, this takes a long time: on the current chain (100k blocks), it takes about 5 minutes to decode all blocks.

This method only decodes the necessary fields, which gives a speedup of about 150x-200x.

Instead of a Benchmark, there is only a TestBenchmark, because go's Benchmark insists on using high numbers of b.N, which take too long...

Closes #2374