Enable lighthouse to build on riscv64#7310
Conversation
|
Duplicated with #7309 |
|
Awesome, I have not seen your PR. Great work on getting a full node to run on riscv by the way. |
Probably because I mentioned it on the EoA Discord channel - that likely prompted both of us to submit around the same time. :) Earlier, I also compiled Lighthouse v6.0.1 on RISC-V, but it required significantly more modifications. I wrote about it on my blog: https://www.web3pi.io/blog/ethereum-node-on-risc-v |
@michaelsproul To shill riscv a bit: Now that lighthouse is the 2nd consensus client to be able to be built out of the box on riscv boards, it would be awesome if you could automate a riscv build in your CI. Geth does this already as well as MEV-Boost. Nimbus at least seems open to the idea. See a discussion yorick, tersec and I had on the R&D discord a few weeks ago: https://discord.com/channels/595666850260713488/595721451651465227/1351180168365998101 another discussion between yorick and potuz from the same time is also interesting: https://discord.com/channels/595666850260713488/692062809701482577/1351186849946669116 At the moment the available riscv hardware is just barely powerful enough to run an RPC node on mainnet. This is already a huge leap compared to what we had last summer. I expect that in a year or so, more powerful boards will be available and people will want to run clients on these boards. Yorick from eth-docker extended his software to be able to run on riscv. The biggest problem at the moment is that there are only riscv docker images available for geth. If lighthouse would provide some as well, that would be amazing and people could start using riscv boards with a much lower barrier to entry than there is now. |
|
Awesome, thank you both! I think we could set up some RISCV builds using the same cross-compilation toolkit we use for ARM. Would either of you be interested in working on this? If so, have a look at the makefile and |
|
I aligned with @cmd0s and he is more than happy to look into it. |
|
I'm really glad to see your willingness to adopt the RISC-V architecture! Over the past few months, I've spent quite a bit of time on this topic - I have several different development boards with RISC-V processors, so I'll be able to run proper tests on real hardware. I'm also working on a project called Web3 Pi, which simplifies and automates the process of running nodes on Raspberry Pi (ARM). I'd be happy to help with getting Lighthouse running smoothly on RISC-V as well. |

Issue Addressed
#6297
This will fully solve the issue and it can be closed.
Proposed Changes
Add riscv64 architecture in the bls_hardware_acceleration() function.
It will return false in every case as there is no hardware acceleration available on this platform at the moment. This can be changed later when actual hardware acceleration is used and specific code for this hardware has been implemented
Additional Info
Build tested on my lichee pi 3a board.