talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia.watch
MIT License
128 stars 62 forks source link

Bump ring dependency to 0.17.0 #243

Open grubles opened 8 months ago

grubles commented 8 months ago

0.16.20 does not support ppc64le arch. The recently released 0.17.0 does. Is there anything that would prevent bumping the version?

sr-gi commented 8 months ago

ring is not a direct dependency of teos, but on the dependency chain of rcgen IIRC.

Looks like the latest version of rcgen (0.11.3) still uses ring 0.16. I wouldn't mind bumping rcgen's version once it includes ring 0.17.0.

What is your use-case btw, deploying teos on a PowerPC?

grubles commented 8 months ago

Yes I have a beefy modern POWER machine I'd like to run a watchtower on for friends.

grubles commented 6 months ago

Looks like rcgen 0.12.0 is now released and includes ring 0.17. https://github.com/rustls/rcgen/blob/main/rcgen/CHANGELOG.md#release-0120---december-16-2023

sr-gi commented 6 months ago

@grubles would you mind giving https://github.com/talaia-labs/rust-teos/pull/248 a go?

grubles commented 5 months ago

If I build using cargo install --path teos, I still hit an error about ring v0.16.20. Should I be building a different way? Sorry, not super familiar with building rust projects.

error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/home/user/builds/rust-teos/target/release/build/ring-893e2ab3b92e0036/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:358:10:
  called `Option::unwrap()` on a `None` value
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `teos v0.2.0 (/home/user/builds/rust-teos/teos)`, intermediate artifacts can be found at `/home/user/builds/rust-teos/target`.
sr-gi commented 5 months ago

Ok, my bad. Looks like rcgen was not our only dependency that had a dependency chain with ring 0.16. Turns out tonic does too (a double one actually: tonic -> rustls - > ring and tonic -> tokio-rustls - > rustls -> ring).

The good news is that rustls v22 already uses ring v17 (ref), and the last version of tokio-rustls uses rustls v22 (ref). The bad news is that tonic has not yet updated to any of them (ref), so we are still stuck until our dependencies bumps theirs.

grubles commented 5 months ago

Ah bummer I was afraid that was the case. Okay I suppose we wait until tonic is updated then.