Consensys / orion

Orion is a PegaSys component for doing private transactions
https://docs.orion.consensys.net/
Apache License 2.0
91 stars 43 forks source link

Issue creating keys on v21.1.1 #421

Closed joshuafernandes closed 3 years ago

joshuafernandes commented 3 years ago

Copying the binary to a container and attempting to create a set of keys to use fails. Expected use case is that creation of keys should work.

Steps to reproduce:

Run with:

root@besu-node-tx-1-pre-install-hook-g9rrm:/tmp# orion -v
orion/v21.1.1/linux-x86_64/openjdk-java-11
root@besu-node-tx-1-pre-install-hook-g9rrm:/tmp# echo $'\n\n' > /tmp/password.txt
root@besu-node-tx-1-pre-install-hook-g9rrm:/tmp# /opt/orion/bin/orion orion -g nodekey < /tmp/password.txt 
[INFO ] [main] 04-12-2021 10:12:39 n.c.o.c.Orion - starting orion
[INFO ] [main] 04-12-2021 10:12:39 n.c.o.c.Orion - using /tmp/orion provided config file
[ERROR] [main] 04-12-2021 10:12:39 n.c.o.c.Orion - Could not open '/tmp/orion': orion
java.nio.file.NoSuchFileException: orion
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
        at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149) ~[?:?]
        at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) ~[?:?]
        at java.nio.file.Files.readAttributes(Files.java:1763) ~[?:?]
        at java.nio.file.Files.size(Files.java:2380) ~[?:?]
        at org.antlr.v4.runtime.CharStreams.fromPath(CharStreams.java:86) ~[antlr4-runtime-4.7.1.jar:4.7.1]
        at org.antlr.v4.runtime.CharStreams.fromPath(CharStreams.java:76) ~[antlr4-runtime-4.7.1.jar:4.7.1]
        at org.apache.tuweni.toml.Toml.parse(Toml.java:79) ~[toml-1.3.0.jar:1.3.0]
        at org.apache.tuweni.toml.Toml.parse(Toml.java:67) ~[toml-1.3.0.jar:1.3.0]
        at org.apache.tuweni.config.Configuration.fromToml(Configuration.java:82) ~[config-1.3.0.jar:1.3.0]
        at net.consensys.orion.config.Config.load(Config.java:57) ~[orion-21.1.1.jar:21.1.1]
        at net.consensys.orion.cmd.Orion.loadConfig(Orion.java:659) ~[orion-21.1.1.jar:21.1.1]
        at net.consensys.orion.cmd.Orion.run(Orion.java:340) ~[orion-21.1.1.jar:21.1.1]
        at net.consensys.orion.cmd.Orion.main(Orion.java:136) [orion-21.1.1.jar:21.1.1]
Could not open '/tmp/orion': orion
root@besu-node-tx-1-pre-install-hook-g9rrm:/tmp# 
joshuafernandes commented 3 years ago

Fixed with libsodium as a dependency