You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are historical reasons for this: e.g. the first approach predates the second. But there is no technical reason for having two separate approaches.
In terms of computational expense, the first approach is cheaper than the second one. But in practice:
we have to calculate the root Merkle tree hash once for signing purposes.
the code repeatedly generates chain key using the first approach.
This means, if merkle tree root is generated once and cached as part of ECChain struct the computational expense becomes a non-issue if not cheaper.
Additionally, this approach would benefit #792, because chainexchange no longer needs to own the concept of generating keys for chains. We can just call ECChain.Key and use the same key across the entire implementation.
On approach, the idea is to use sync.Once and cache the merkle tree root as key lazily.
The text was updated successfully, but these errors were encountered:
The current implementation uses two approaches for generating key for a given EC Chain:
ChainKey
construction by hashing each of the tipsetsThere are historical reasons for this: e.g. the first approach predates the second. But there is no technical reason for having two separate approaches.
In terms of computational expense, the first approach is cheaper than the second one. But in practice:
This means, if merkle tree root is generated once and cached as part of ECChain struct the computational expense becomes a non-issue if not cheaper.
Additionally, this approach would benefit #792, because chainexchange no longer needs to own the concept of generating keys for chains. We can just call
ECChain.Key
and use the same key across the entire implementation.On approach, the idea is to use
sync.Once
and cache the merkle tree root as key lazily.The text was updated successfully, but these errors were encountered: