clearmatics/zeth

Cast error boost `--keypair` flag

AntoineRondelet opened this issue · 1 comments

After running the prover_server in an Alpine container (Alpine 3.11.5), I get the following error when trying to load a keypair via the --keypair flag (-k for short). The keypair was generated just before being loaded, and was written in: /home/zeth/trusted_setup/keypair.bin

bash-5.0# prover_server -k /home/zeth/trusted_setup/keypair.bin
terminate called after throwing an instance of 'boost::wrapexcept<boost::bad_any_cast>'
  what():  boost::bad_any_cast: failed conversion using boost::any_cast
Aborted (core dumped)

Not using the flag, and relying on the default behavior that searches an existing SRS in $ZETH_TRUSTED_SETUP_DIR or in $HOME (if the previous env var isn't defined) works well. The problem arises when using the flag.

@dtebbs can you please have a look at this?

You should be able to reproduce this by:

docker pull clearmatics/zeth-base:latest
docker run -ti -p 50051:50051 --name base-container clearmatics/zeth-base:latest

# Then make sure to be in line with origin/develop in Zeth - run the following in `zeth` in another terminal
docker cp . <container-id>:/home/zeth

# Then in the docker container run
cd /home/zeth
rm -rf build
mkdir build
cd build
cmake ..
make
prover_server
# Then ctrl-C afer SRS gen
prover_server --keypair <path-to-SRS>

Closing this issue since the corresponding PR has been merged. Thanks @dtebbs