Concordium/concordium-base

[concordium-base] Web3IDCredential is not Send, but would be better if it was.

abizjak opened this issue · 0 comments

Description

The type Web3IdCredential and others which contain the Value wrapper (which we use for secrets) are not Send.

This causes odd errors when attempting to use them in services. In particular they cannot be transferred through channels, e.g., tokio::sync::mpsc channel.

The reason for this is that underneath there is an Rc to avoid cloning the actual secret data, and just cloning the pointer to the data.

It would be more ergonomic if we changed the underlying wrapper to an Arc. These values are not cloned a lot, so there will be no observable performance impact.