eigerco / lumina

Wasm friendly Celestia light node implementation in Rust
Apache License 2.0
120 stars 35 forks source link

Allow usage of `zeroize 1.4` #381

Open appetrosyan opened 1 month ago

appetrosyan commented 1 month ago

Summary

Can't build a project with dependencies,

celestia-types = "0.4.0"
solana-transaction-status = "1.18.22"

Overview

Solana hasn't yet fully implemented the shift towards the new versions of Rust cryptographic libraries; as such it is not possible to use any component of the lumina client in a crate that also imports any of the solana crates that uses Rust cryptographic libraries.

As such it is wise to provide a branch with slightly less advanced dependencies, particularly ruint and a few others, that I will add to this list.

oblique commented 1 month ago

Hi. We discussed as a team about the issue and we are a bit unsure if we want to have an extra release or extra branch to maintain. We also want to move away from celestia-tendermint-rs fork and use the original tendermint-rs.

What we can do is to have a solana-sdk-compat branch for now but we can not commit on maintaining it. What do you think?

appetrosyan commented 1 month ago

I already have a vendored version of Lumina that works. And it’s actually really straightforward in some ways.

The only problem is that we also need to vendor rustls, but in such a way that could also (in theory) be upstreamed: only one line of code is changed.

You wouldn’t exactly need to maintain anything; I’ll demonstrate this shortly.

appetrosyan commented 1 month ago

https://github.com/Eclipse-Laboratories-Inc/lumina

This only fixes the types and rpc crates, but in principle the idea can be extended to work with other workspace members too.

zvolin commented 1 month ago

The thing is that it will not allow us to publish crates, so there is no way we could upstream it

[patch.crates-io.rustls]
git = "https://github.com/Eclipse-Laboratories-Inc/rustls.git"
appetrosyan commented 1 month ago

Just a proof of concept. The end result would also have to include fixes and work in WASM.

If the changes are accepted in upstream rustls, then you won’t need to patch. The resolver will use that version which allows all deps to be satifsied.

Another option is to ask zeroize to increment the major version as they should have done in version 1.4. There would be more upstream crates that would need to upgrade, but it’s also much more likely to occur naturally.