Closed riordant closed 1 year ago
Hi @riordant - which raspberry pi are you using exactly?
Have you got more logs that show more of the error?
Hi, It's a Raspberry Pi 4 Model B, running Raspberry Pi OS. These are the only logs that are relevant. It is ARM based. Is that an issue?
It could be an issue. The native library we use for BLS might not support that ARM architecture. If we don't support architecture, we should fall back to Java, but that might not be happening. It will be slower if it doesn't use the native library.
In any case, we will test this out on a Raspberry Pi 4.
Awesome, thanks.
Tested against Raspberry Pi 3 Model B v1.2 with 64 bit Raspberry PI OS
uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Web3Signer is able to load native BLST library successfully:
usman@raspberrypi:~/web3signer-23.3.1/bin $ ./web3signer --config-file /home/usman/config/config.yaml eth2
2023-06-08 12:02:23.363+10:00 | main | INFO | Web3SignerApp | Web3Signer has started with args --config-file,/home/usman/config/config.yaml,eth2
2023-06-08 12:02:23.680+10:00 | main | INFO | Web3SignerApp | Version = web3signer/v23.3.1/linux-aarch_64/-eclipseadoptium-openjdk64bitservervm-java-11
2023-06-08 12:02:32.392+10:00 | main | INFO | Eth2SubCommand | Network: mainnet
Spec Name: PHASE0, Fork Epoch: 0, First Slot: 0
Spec Name: ALTAIR, Fork Epoch: 74240, First Slot: 2375680
Spec Name: BELLATRIX, Fork Epoch: 144896, First Slot: 4636672
Spec Name: CAPELLA, Fork Epoch: 194048, First Slot: 6209536
2023-06-08 12:02:34.429+10:00 | pool-2-thread-1 | INFO | SignerLoader | Loading signer configuration metadata files from /home/usman/config/keys
2023-06-08 12:02:34.487+10:00 | pool-2-thread-1 | INFO | SignerLoader | Signer configuration metadata files read in memory 1 in 00:00:00.047
2023-06-08 12:02:34.513+10:00 | ForkJoinPool-1-worker-3 | INFO | SignerLoader | Parsing configuration metadata files
2023-06-08 12:02:35.130+10:00 | ForkJoinPool-1-worker-3 | INFO | teku-status-log | Using portable BLST library.
2023-06-08 12:02:35.238+10:00 | ForkJoinPool-1-worker-3 | INFO | BLS | BLS: loaded BLST library
2023-06-08 12:02:35.277+10:00 | ForkJoinPool-1-worker-3 | INFO | SignerLoader | Total configuration metadata files processed: 1
2023-06-08 12:02:35.279+10:00 | ForkJoinPool-1-worker-3 | INFO | SignerLoader | Total signers loaded from configuration files: 1 in 00:00:00.760 with error count 0
2023-06-08 12:02:35.315+10:00 | pool-2-thread-1 | INFO | DefaultArtifactSignerProvider | Total signers (keys) currently loaded in memory: 1
2023-06-08 12:02:41.804+10:00 | main | INFO | Runner | Web3Signer has started with TLS disabled, and ready to handle signing requests on 0.0.0.0:9000
Tested against Raspberry Pi 3 Model B v1.2 with 32 bit Raspberry PI OS
The native BLST library (provided via Teku libraries) fails to load native implementation and raises an exception instead of reverting back to non-native implementation. This results in failure to load the private key. However, web3signer still starts.
./web3signer --config-file /home/usman/config/config.yaml eth2
2023-06-08 12:49:55.709+10:00 | main | INFO | Web3SignerApp | Web3Signer has started with args --config-file,/home/usman/config/config.yaml,eth2
2023-06-08 12:49:55.865+10:00 | main | INFO | Web3SignerApp | Version = web3signer/v23.3.1/linux-arm_32/zulu-java-11
2023-06-08 12:50:02.374+10:00 | main | INFO | Eth2SubCommand | Network: mainnet
Spec Name: PHASE0, Fork Epoch: 0, First Slot: 0
Spec Name: ALTAIR, Fork Epoch: 74240, First Slot: 2375680
Spec Name: BELLATRIX, Fork Epoch: 144896, First Slot: 4636672
Spec Name: CAPELLA, Fork Epoch: 194048, First Slot: 6209536
2023-06-08 12:50:03.909+10:00 | pool-2-thread-1 | INFO | SignerLoader | Loading signer configuration metadata files from /home/usman/config/keys
2023-06-08 12:50:03.946+10:00 | pool-2-thread-1 | INFO | SignerLoader | Signer configuration metadata files read in memory 1 in 00:00:00.027
2023-06-08 12:50:03.961+10:00 | ForkJoinPool-1-worker-3 | INFO | SignerLoader | Parsing configuration metadata files
2023-06-08 12:50:04.451+10:00 | ForkJoinPool-1-worker-3 | INFO | teku-status-log | Using portable BLST library.
2023-06-08 12:50:04.484+10:00 | ForkJoinPool-1-worker-3 | ERROR | BlstLoader | Couldn't load native BLS library
java.lang.ExceptionInInitializerError: null
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:315) ~[?:?]
at tech.pegasys.teku.bls.impl.blst.BlstLoader.loadBlst(BlstLoader.java:49) ~[bls-23.3.1.jar:23.3.1]
at tech.pegasys.teku.bls.impl.blst.BlstLoader.<clinit>(BlstLoader.java:38) ~[bls-23.3.1.jar:23.3.1]
at tech.pegasys.teku.bls.BLS.resetBlsImplementation(BLS.java:56) ~[bls-23.3.1.jar:23.3.1]
at tech.pegasys.teku.bls.BLS.<clinit>(BLS.java:48) ~[bls-23.3.1.jar:23.3.1]
at tech.pegasys.teku.bls.BLSSecretKey.fromBytes(BLSSecretKey.java:38) ~[bls-23.3.1.jar:23.3.1]
at tech.pegasys.web3signer.signing.config.metadata.BlsArtifactSignerFactory.create(BlsArtifactSignerFactory.java:71) ~[web3signer-signing-23.3.1.jar:23.3.1]
at tech.pegasys.web3signer.signing.config.metadata.FileRawSigningMetadata.createSigner(FileRawSigningMetadata.java:34) ~[web3signer-signing-23.3.1.jar:23.3.1]
Caused by: java.lang.RuntimeException: no blst in java.library.path: [/usr/java/packages/lib, /lib, /usr/lib]
at supranational.blst.blstJNI.<clinit>(blstJNI.java:31) ~[jblst-0.3.8.jar:?]
... 49 more
Caused by: java.lang.ExceptionInInitializerError
at tech.pegasys.teku.bls.BLSSecretKey.fromBytes(BLSSecretKey.java:38) ~[bls-23.3.1.jar:23.3.1]
at tech.pegasys.web3signer.signing.config.metadata.BlsArtifactSignerFactory.create(BlsArtifactSignerFactory.java:71) ~[web3signer-signing-23.3.1.jar:23.3.1]
at tech.pegasys.web3signer.signing.config.metadata.FileRawSigningMetadata.createSigner(FileRawSigningMetadata.java:34) ~[web3signer-signing-23.3.1.jar:23.3.1]
2023-06-08 12:50:04.576+10:00 | pool-2-thread-1 | WARN | Eth2Runner | No BLS keys loaded. Check that the key store has BLS key config files
2023-06-08 12:50:04.583+10:00 | pool-2-thread-1 | INFO | DefaultArtifactSignerProvider | Total signers (keys) currently loaded in memory: 0
2023-06-08 12:50:08.694+10:00 | main | INFO | Runner | Web3Signer has started with TLS disabled, and ready to handle signing requests on 0.0.0.0:9000
Web3Signer indirectly use https://github.com/ConsenSys/jblst which is currently not supported for 32 bit OS, which makes Web3Signer not supported on 32 bit OS.
Suggested workaround, use 64 bit OS on Raspberry PI.
@riordant kindly have a look at above analysis. You may have to use 64 bit OS on your Raspberry PI instance.
@riordant if you want to use Raspberry OS 32 bit, you have to rebuilt jblst jar on your Raspberry PI and replace the bundled jblst jar with it. Here are the instructions that I've followed: https://gist.github.com/usmansaleem/650813a81c41298e6b6f45137ef133cd
Closing the issue, please reopen if you have further queries.
Hi, I am unable to run the eth2 signing. I am using a rasperry pi.
here is the output:
thanks