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
To make libp2p build on the RISC-V CPU architecture (sigp/lighthouse#6297) thering library used in the rcgen package needs to be updated. Luckily version 0.12 and above depend on the newer (v0.17) ring package. Unfortunately, some changes are necessary to upgrade to the newer version. I personally see 2 ways to get there. I will add working versions for both these upgrade paths in separate PRs.
Path 1: update to rcgen 0.12.1
libp2p directly depends on the rcgen package, but there is an additional dependency: libp2p-webrtc is using webrtc which depends on rcgen as well. None of the webrtc versions use rcgen v0.12 They directly jump from v0.11 to v0.13
A solution is to update rcgen to 0.12.1 in the main Cargo.toml, but use a lower version (v0.11.3) in the webrtcCargo.toml.
This works with only minimal changes and achieves the goal of being able to build lighthouse as it only depends on libp2p-tls. But now libp2p uses 2 different versions of rcgen, which I think is a bit ugly. It is a simple and fast change without though.
Path 2: update to rcgen 0.13
rcgen changed their interface substantially in the 0.12->0.13 upgrade (https://github.com/rustls/rcgen/blob/main/rcgen/docs/0.12-to-0.13.md). Therefore, this approach needs a few changes in the tls and webrtc part of libp2p. The imported webrtc package also needs to be update to 0.11 which also changes the interface which leads to additional changes.
The changes in the PR upgrading of rcgen to 0.13 should not be taken as a final version. My goal was to get things running to see how many changes are necessary. I do not know the rcgen and libp2p2 code base well enough to make sure I did not break anything with these changes. I ran all the tests (minus doc tests) and they all passed. I also built the lighthouse client which depends on libp2p-tls and it works and the client runs without any issues. So my changes did not break anything obvious.
I obviously would be very happy if you find a more elegant way to upgrade the rcgen dependency so we can get a step closer to build lighthouse on a RISC-V CPU architecture.
Motivation
The goal is to get lighthouse, which depends on libp2p-tls to build on RISC-V boards: sigp/lighthouse#6297
Locally with my own changes it does and it works perfectly. The goal is to incorporate all these changes to the respective repos.
Current Implementation
Currently building on RISC-V architecture fails due to the ring library which is used by rcgen. Newer versions work and the goal of this enhancement suggestion is to update to a newer version.
Are you planning to do it yourself in a pull request ?
Yes
The text was updated successfully, but these errors were encountered:
Description
To make
libp2p
build on the RISC-V CPU architecture (sigp/lighthouse#6297) thering
library used in thercgen
package needs to be updated. Luckily version 0.12 and above depend on the newer (v0.17)ring
package. Unfortunately, some changes are necessary to upgrade to the newer version. I personally see 2 ways to get there. I will add working versions for both these upgrade paths in separate PRs.Path 1: update to rcgen 0.12.1
libp2p
directly depends on thercgen
package, but there is an additional dependency:libp2p-webrtc
is usingwebrtc
which depends onrcgen
as well. None of thewebrtc
versions usercgen
v0.12 They directly jump from v0.11 to v0.13A solution is to update
rcgen
to 0.12.1 in the mainCargo.toml
, but use a lower version (v0.11.3) in thewebrtc
Cargo.toml
.This works with only minimal changes and achieves the goal of being able to build lighthouse as it only depends on libp2p-tls. But now
libp2p
uses 2 different versions ofrcgen
, which I think is a bit ugly. It is a simple and fast change without though.Path 2: update to rcgen 0.13
rcgen
changed their interface substantially in the 0.12->0.13 upgrade (https://github.com/rustls/rcgen/blob/main/rcgen/docs/0.12-to-0.13.md). Therefore, this approach needs a few changes in thetls
andwebrtc
part of libp2p. The importedwebrtc
package also needs to be update to 0.11 which also changes the interface which leads to additional changes.The changes in the PR upgrading of rcgen to 0.13 should not be taken as a final version. My goal was to get things running to see how many changes are necessary. I do not know the
rcgen
andlibp2p2
code base well enough to make sure I did not break anything with these changes. I ran all the tests (minus doc tests) and they all passed. I also built the lighthouse client which depends on libp2p-tls and it works and the client runs without any issues. So my changes did not break anything obvious.I obviously would be very happy if you find a more elegant way to upgrade the
rcgen
dependency so we can get a step closer to build lighthouse on a RISC-V CPU architecture.Motivation
The goal is to get lighthouse, which depends on libp2p-tls to build on RISC-V boards: sigp/lighthouse#6297
Locally with my own changes it does and it works perfectly. The goal is to incorporate all these changes to the respective repos.
Current Implementation
Currently building on RISC-V architecture fails due to the
ring
library which is used byrcgen
. Newer versions work and the goal of this enhancement suggestion is to update to a newer version.Are you planning to do it yourself in a pull request ?
Yes
The text was updated successfully, but these errors were encountered: