input-output-hk / decentralized-software-updates

Research on a decentralized software update mechanism for blockchain systems
Apache License 2.0
7 stars 2 forks source link

Optimize the ProposalsState structure to avoid multiple copies of voters key hashes #135

Open dnadales opened 4 years ago

dnadales commented 4 years ago

Currently ProposalsState is basically a map from proposal id to (hash vkey, confidence). The problem with this representation is that the hash of the key has to be copied per each proposal. Since we expect to have more participants than proposal we should invert the map.

We should map hash vkey to (proposal id, confidence) to avoid replicating the hash key inside ProposalsState.

Also we should keep an eye on the benchmarks to make sure: