nervosnetwork / fiber

16 stars 8 forks source link

Cross-chain hub future works #88

Open doitian opened 3 months ago

doitian commented 3 months ago

From #46

doitian commented 3 months ago

In issue #46, a workaround is implemented for the second action item. When the preimage is submitted through RemoveTlc, both the blake2b and sha256 algorithms are attempted.

However, it is important to note that the lock contract has not been updated. Therefore, if a dispute arises, the saved sha256 preimage cannot be utilized to claim the HTLC outputs.

As an alternative solution, it is suggested to configure the hash algorithm either when opening a channel or when adding a tlc. The lock contract must update to accept sha256 preimage as well.