Neptune-Crypto / neptune-core

anonymous peer-to-peer cash
Apache License 2.0
24 stars 7 forks source link

Improve `RemovalRecordsIntegrity` #166

Open aszepieniec opened 1 month ago

aszepieniec commented 1 month ago

The first iteration of the RemovalRecordsIntegrity consensus program has a rather disappointing performance, clocking in at 358000 cycles for an arbitrary 2-in 2-out transaction.

clock cycle count hash table height u32 table height op stack height ram table height
358251 49708 46564 252217 63020

Looking at the profile, it seems that more than two thirds of the clock cycles are spent verifying MMR authentication paths. (We need to do that because otherwise someone could produce a transaction with removal records that cannot be applied to the mutator set, but which still looks valid.)

There are several ways in which we might address this performance issue.