Coder Social home page Coder Social logo

dyne / sawroom Goto Github PK

View Code? Open in Web Editor NEW
6.0 16.0 3.0 266 KB

Zenroom Transaction Processor for Hyperledger Sawtooth

Home Page: https://sawroom.dyne.org

License: GNU Affero General Public License v3.0

Python 40.46% Dockerfile 11.38% CSS 1.26% Shell 37.39% HTML 9.37% Makefile 0.14%
sawtooth hyperledger blockchain crypto smart-contracts

sawroom's People

Contributors

andrea-dintino avatar jaromil avatar parazyd avatar puria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sawroom's Issues

Issue with the Raspberry64 Dockerfile

After building and running the container, docker reports using these ip:ports:

0.0.0.0:8008->8008/tcp, 0.0.0.0:9001->9001/tcp, 0.0.0.0:9009->9009/tcp

In reality only the 9009 ports responds, the others don't. Running supervisorctl returns:

root@590e7112dd51:/project# supervisorctl
consensus-engines:pbft RUNNING pid 535, uptime 0:00:37
decode-os:dam-client FATAL Exited too quickly (process log may have details)
decode-os:dam-dir FATAL Exited too quickly (process log may have details)
decode-os:tor FATAL Exited too quickly (process log may have details)
sawtooth-core:rest-api STARTING
sawtooth-core:validator FATAL Exited too quickly (process log may have details)
transaction-processors:block-info RUNNING pid 15, uptime 0:05:39
transaction-processors:identity RUNNING pid 16, uptime 0:05:39
transaction-processors:petition EXITED Jan 22 05:17 PM
transaction-processors:petition-api RUNNING pid 13, uptime 0:05:39
transaction-processors:settings RUNNING pid 14, uptime 0:05:39

and ps aux returns
root@590e7112dd51:/project# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 2084 584 ? Ss 17:17 0:00 /bin/sh -c /etc/init.d/supervisor start
root 8 0.0 0.0 2084 636 ? S 17:17 0:00 /bin/sh /etc/init.d/supervisor start
root 10 0.6 0.5 28092 22964 ? S 17:17 0:02 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
sawroom 13 0.4 1.0 49808 42124 ? S 17:17 0:02 /usr/bin/python3 /usr/local/bin/hypercorn -b 0.0.0.0:9009 src.tp.server.main:app
sawroom 14 1.0 0.1 232488 6248 ? Sl 17:17 0:04 /usr/local/bin/settings-tp --connect tcp://127.0.0.1:4004
sawroom 15 1.0 0.1 232412 6340 ? Sl 17:17 0:04 /usr/local/bin/block-info-tp --connect tcp://127.0.0.1:4004
sawroom 16 1.0 0.1 232556 6236 ? Sl 17:17 0:04 /usr/local/bin/identity-tp --connect tcp://127.0.0.1:4004
root 137 0.0 0.0 5656 3408 pts/0 Ss 17:18 0:00 /bin/bash
sawroom 535 1.0 0.1 166068 7204 ? Sl 17:22 0:01 pbft-engine --connect tcp://127.0.0.1:5050
sawroom 780 0.0 0.2 12520 8620 ? R 17:24 0:00 /usr/bin/python3 /usr/local/bin/sawtooth-rest-api --connect tcp://127.0.0.1:4004 --bind 0.0.0.0:8008
root 781 0.0 0.0 8060 2796 pts/0 R+ 17:24 0:00 ps aux

The run script breaks, it probably fails to create folders

When executing run I get this error:

docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /var/lib/sawroom/data.

The issue seems to be the --mount parameter, replacing it with -v fixes

The fixed script:

#!/bin/sh

# set it to somewhere in the home
src=/var/lib/sawroom
touch $src/.keep || return 1

# if test "$src" = "."; then
#    src=$(pwd)
# fi
ID=$(id -ru)
mkdir -p "$src"/data
mkdir -p "$src"/keys/sawtooth "$src"/keys/tor
mkdir -p "$src"/log/sawtooth "$src"/log/tor
t="$src"/log/tor/dam-client.log && touch "$t"
t="$src"/log/tor/dam-dir.log && touch "$t"
t="$src"/log/tor/tor.log && touch "$t"

# --mount type=bind,source="$src"/keys/tor,destination=/etc/tor \

cat <<EOF
 ___   ___      _____  ___   ___  __  __ 
/ __| /_\ \    / / _ \/ _ \ / _ \|  \/  |
\__ \/ _ \ \/\/ /|   / (_) | (_) | |\/| |
|___/_/ \_\_/\_/ |_|_\\___/ \___/|_|  |_|

Started full node, local consoles links:

Service supervisor: https://127.0.0.1:9001

Netdata monitor: http://127.0.0.1:19999

Execute ./shell to step into the running container
Hit Ctrl-C to stop

EOF

if [ "$1" = "" ]; then
	docker run -it \
		   -v type=bind,source="$src"/data,destination=/var/lib/sawtooth \
		   -v type=bind,source="$src"/keys/sawtooth,destination=/etc/sawtooth/keys \
		   -v type=bind,source="$src"/keys/tor,destination=/var/lib/tor \
		   -v type=bind,source="$src"/log/sawtooth,destination=/var/log/sawtooth \
		   -v type=bind,source="$src"/log/tor,destination=/var/log/tor \
		   -p 8008:8008 \
		   -p 9009:9009 \
		   dyne/sawroom:testnet sawroom-start $ID
else
	docker run -it \
		   --mount type=bind,source="$src"/data,destination=/var/lib/sawtooth \
		   --mount type=bind,source="$src"/keys/sawtooth,destination=/etc/sawtooth/keys \
		   --mount type=bind,source="$src"/keys/tor,destination=/var/lib/tor \
		   --mount type=bind,source="$src"/log/sawtooth,destination=/var/log/sawtooth \
		   --mount type=bind,source="$src"/log/tor,destination=/var/log/tor \
		   -p 8008:8008 \
		   -p 9009:9009 \
		   dyne/sawroom:testnet $*
fi

logrotate

rotate all logs in /var/log/sawtooth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.