MerosCrypto / Meros

An instant and feeless cryptocurrency for the future, secured by the Merit Caching Consensus Mechanism.
https://meroscrypto.io
Other
83 stars 19 forks source link

Consensus statuses use seqs for the holders; they truly should use sets. #280

Open kayabaNerve opened 3 years ago

kayabaNerve commented 3 years ago

I don't believe any of the code would change, except for .len calls (which simply transform to .card). That said, adding to the group would never require a resize, and we can check for existing inclusion in O(1) instead of O(n). We already don't expect this to be sorted, and call sort where needed (serialization for merkle proofs). That should remain unchanged.

If we also edit VerificationPacket objects, combing them into existing statuses also becomes much more efficient.