Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zenroom and other tools are required for some operations #10

Open
sargue opened this issue Mar 10, 2022 · 2 comments
Open

Zenroom and other tools are required for some operations #10

sargue opened this issue Mar 10, 2022 · 2 comments

Comments

@sargue
Copy link

sargue commented Mar 10, 2022

Example:

$ make genesis-create
/bin/sh: 1: zenroom: not found
/bin/sh: 1: jq: not found

###########################
now RUN: make genesis-init
###########################

Those tools are probably inside the docker image so instead of trying to run directly on the host perhaps a solution is to run it inside a docker instance mounting the proper paths.

@sargue
Copy link
Author

sargue commented Mar 10, 2022

Actually jq is not even part of the docker image so that won't work either.

@sargue
Copy link
Author

sargue commented Mar 10, 2022

Once jq is installed on the system this change to the Makefile does the trick:

SCRIPTS := $(realpath ./scripts)

##@ Genesis commands
genesis-create: ## Create data/genesis.json from parameters in scripts/params_genesis.json
	$(if $(wildcard data/genesis.json), $(error Cannot overwrite data/genesis.json))
	$(if $(wildcard scripts/params_genesis.json),,\
		$(error Genesis parameters not found in scripts/params_genesis.json))
	docker run --rm \
	 --mount "type=bind,source=${SCRIPTS},destination=/home/geth/scripts" \
	 ${DOCKER_IMAGE} \
	 zenroom scripts/genesis.lua -a scripts/params_genesis.json | jq . | tee data/genesis.json
	@echo
	@echo "###########################"
	@echo "now RUN: make genesis-init"
	@echo "###########################"
	@echo

I can prepare a PR if you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant