input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
115 stars 36 forks source link

Pooled resources should be reset when given back #1743

Closed jpraynaud closed 3 weeks ago

jpraynaud commented 3 weeks ago

Why

When resources are given back to a resource pool (e.g. Merkle maps in the Cardano transaction prover), they need to be reset properly (e.g. the Merkle map should be compressed so that all its values are represented by their root). This will guarantee that pooled resources are consistent and do not depend from previous computations. (e.g. this will avoid the risk of memory overflow and provide a consistent proving time).

What

Design a reset behavior for pooled resources, and implement it for Merkle maps.

How