diff --git a/docker_files/Dockerfile b/docker_files/Dockerfile index 3d9caf7..2525c99 100644 --- a/docker_files/Dockerfile +++ b/docker_files/Dockerfile @@ -1,5 +1,5 @@ # ===================================================== -# Zenith RPC Server Image +# Zenith Full Node Wallet and RPC Server # ===================================================== FROM ubuntu:22.04 @@ -9,9 +9,13 @@ RUN apt update ENV DEBIAN_FRONTEND=noninteractive # Update the package list and install necessary packages - +RUN apt-get install -qqy xterm x11-apps + RUN apt-get install -y \ + libxss-dev \ + libxrandr-dev \ libsecp256k1-dev \ + xclip \ libglew-dev \ libsdl2-dev @@ -19,7 +23,7 @@ RUN apt-get clean \ && rm -rf /var/lib/apt/lists/* # Create a new user (e.g., "zenusr") and set a password -RUN useradd -ms /bin/bash zenusr +RUN useradd -ms /bin/bash zenusr RUN echo "1234\n1234\n" | passwd zenusr RUN mkdir /home/zenusr/Zenith @@ -29,8 +33,11 @@ COPY scripts/bash_rc_adm /root/.bashrc COPY scripts/bash_rc_usr /home/zenusr/.bashrc COPY scripts/welcome.sh /etc/profile.d/welcome.sh RUN chmod +x /etc/profile.d/welcome.sh +# +COPY bin/zenith /usr/local/bin +COPY bin/startzen /usr/local/bin COPY bin/zenithserver /usr/local/bin -COPY bin/startrpc /usr/local/bin +# COPY lib/librustzcash_wrapper.so /usr/local/lib COPY Downloads/libc-bin_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/ COPY Downloads/libc-dev-bin_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/ @@ -45,4 +52,4 @@ USER zenusr WORKDIR /home/zenusr ENV USER=zenusr -CMD ["startrpc"] \ No newline at end of file +CMD ["startzen"] \ No newline at end of file diff --git a/docker_files/bin/startrpc b/docker_files/bin/startrpc deleted file mode 100755 index 70a471e..0000000 --- a/docker_files/bin/startrpc +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -if [ x"${EXPERT_MODE}" == "x" ]; then - zenithserver - else - /bin/bash -l -fi diff --git a/docker_files/bin/startzen b/docker_files/bin/startzen new file mode 100755 index 0000000..82522fc --- /dev/null +++ b/docker_files/bin/startzen @@ -0,0 +1,9 @@ +#!/bin/bash +if [ x"${EXPERT_MODE}" == "x0" ] && [ x"${RPC_SERVER}" == "x0" ]; then + zenith gui +elif [ x"${RPC_SERVER}" == "x1" ] && ( [ x"${EXPERT_MODE}" == "x0" ] || [ x"${EXPERT_MODE}" == "x1" ] ); then + zenithserver +else +# xterm -geometry 90x55 -fs 10 -fa DejaVuSansMono -cr green -bg black -fg lightgray + /bin/bash -l +fi diff --git a/docker_files/bin/zenith b/docker_files/bin/zenith new file mode 100755 index 0000000..7b97da2 Binary files /dev/null and b/docker_files/bin/zenith differ diff --git a/docker_files/bin/zenithserver b/docker_files/bin/zenithserver index b0bcbf5..b4858ff 100755 Binary files a/docker_files/bin/zenithserver and b/docker_files/bin/zenithserver differ diff --git a/docker_files/cfg/assets/1F616_color.png b/docker_files/cfg/assets/1F616_color.png new file mode 100644 index 0000000..ac48165 Binary files /dev/null and b/docker_files/cfg/assets/1F616_color.png differ diff --git a/docker_files/cfg/assets/1F928_color.png b/docker_files/cfg/assets/1F928_color.png new file mode 100644 index 0000000..10095c0 Binary files /dev/null and b/docker_files/cfg/assets/1F928_color.png differ diff --git a/docker_files/cfg/assets/1F993.png b/docker_files/cfg/assets/1F993.png new file mode 100644 index 0000000..290f365 Binary files /dev/null and b/docker_files/cfg/assets/1F993.png differ diff --git a/docker_files/cfg/assets/2620_color.png b/docker_files/cfg/assets/2620_color.png new file mode 100644 index 0000000..ecfdc10 Binary files /dev/null and b/docker_files/cfg/assets/2620_color.png differ diff --git a/docker_files/cfg/assets/Atkinson-Hyperlegible-Bold-102.ttf b/docker_files/cfg/assets/Atkinson-Hyperlegible-Bold-102.ttf new file mode 100644 index 0000000..14b7196 Binary files /dev/null and b/docker_files/cfg/assets/Atkinson-Hyperlegible-Bold-102.ttf differ diff --git a/docker_files/cfg/assets/Atkinson-Hyperlegible-BoldItalic-102.ttf b/docker_files/cfg/assets/Atkinson-Hyperlegible-BoldItalic-102.ttf new file mode 100644 index 0000000..4532705 Binary files /dev/null and b/docker_files/cfg/assets/Atkinson-Hyperlegible-BoldItalic-102.ttf differ diff --git a/docker_files/cfg/assets/Atkinson-Hyperlegible-Font-License-2020-1104.pdf b/docker_files/cfg/assets/Atkinson-Hyperlegible-Font-License-2020-1104.pdf new file mode 100644 index 0000000..afe27dc Binary files /dev/null and b/docker_files/cfg/assets/Atkinson-Hyperlegible-Font-License-2020-1104.pdf differ diff --git a/docker_files/cfg/assets/Atkinson-Hyperlegible-Italic-102.ttf b/docker_files/cfg/assets/Atkinson-Hyperlegible-Italic-102.ttf new file mode 100644 index 0000000..89e5ce4 Binary files /dev/null and b/docker_files/cfg/assets/Atkinson-Hyperlegible-Italic-102.ttf differ diff --git a/docker_files/cfg/assets/Atkinson-Hyperlegible-Regular-102.ttf b/docker_files/cfg/assets/Atkinson-Hyperlegible-Regular-102.ttf new file mode 100644 index 0000000..c4fa6fb Binary files /dev/null and b/docker_files/cfg/assets/Atkinson-Hyperlegible-Regular-102.ttf differ diff --git a/docker_files/cfg/assets/DejaVuSansMono-Bold.ttf b/docker_files/cfg/assets/DejaVuSansMono-Bold.ttf new file mode 100644 index 0000000..b210eb5 Binary files /dev/null and b/docker_files/cfg/assets/DejaVuSansMono-Bold.ttf differ diff --git a/docker_files/cfg/assets/DejaVuSansMono-BoldOblique.ttf b/docker_files/cfg/assets/DejaVuSansMono-BoldOblique.ttf new file mode 100644 index 0000000..3211064 Binary files /dev/null and b/docker_files/cfg/assets/DejaVuSansMono-BoldOblique.ttf differ diff --git a/docker_files/cfg/assets/DejaVuSansMono-Oblique.ttf b/docker_files/cfg/assets/DejaVuSansMono-Oblique.ttf new file mode 100644 index 0000000..ff83b15 Binary files /dev/null and b/docker_files/cfg/assets/DejaVuSansMono-Oblique.ttf differ diff --git a/docker_files/cfg/assets/DejaVuSansMono.ttf b/docker_files/cfg/assets/DejaVuSansMono.ttf new file mode 100644 index 0000000..041cffc Binary files /dev/null and b/docker_files/cfg/assets/DejaVuSansMono.ttf differ diff --git a/docker_files/cfg/assets/OpenMoji-color-glyf_colr_1.ttf b/docker_files/cfg/assets/OpenMoji-color-glyf_colr_1.ttf new file mode 100644 index 0000000..86cf85b Binary files /dev/null and b/docker_files/cfg/assets/OpenMoji-color-glyf_colr_1.ttf differ diff --git a/docker_files/cfg/assets/Roboto-Regular.ttf b/docker_files/cfg/assets/Roboto-Regular.ttf new file mode 100644 index 0000000..8c082c8 Binary files /dev/null and b/docker_files/cfg/assets/Roboto-Regular.ttf differ diff --git a/docker_files/cfg/assets/remixicon.ttf b/docker_files/cfg/assets/remixicon.ttf new file mode 100644 index 0000000..22ce6de Binary files /dev/null and b/docker_files/cfg/assets/remixicon.ttf differ diff --git a/docker_files/cfg/runzenith b/docker_files/cfg/runzenith new file mode 100755 index 0000000..c40fcee --- /dev/null +++ b/docker_files/cfg/runzenith @@ -0,0 +1,65 @@ +#!/bin/bash +ZFOLDER=~/Zenith +IMAGE_NAME=zenith-docker:0.7.0.0 + +EXPERTMODE="0" +RPCSERVER="0" + +if [ $# -gt 0 ]; then +while [[ $# -gt 0 ]]; do + case $1 in + -e|--expert) + EXPERTMODE="1" + shift 2 + break + ;; + -r|--rpc) + RPCSERVER="1" + shift 2 + break + ;; + -h|--help) + echo + echo "======================================================" + echo "Zenith Full Node Wallet and RPC server " + echo "version 0.7.0.0" + echo "======================================================" + echo + echo "Usage: runzenith" + echo " runzenith -e|--expert" + echo " runzenith -r|--rpc" + echo "Decription" + echo " no params -> starts zenith GUI wallet" + echo " -e | --expert -> starts zenith in expert mode" + echo " -r | --rpc -> starts zenith's rpc server" + echo " -h | --help -> displays this screen" + echo + exit 0 + ;; + *) + echo "Unknown option: $1" + exit 1 + ;; + esac +done +fi + +# Check if data folder exists +if [ ! -d "$ZFOLDER" ]; then + echo "Error starting Zenith image" + echo "Zenith configurtion and data folder ($ZFOLDER) does not exists." + echo "Aborting process..." + exit +fi + +# Check if the image exists locally +if [[ "$(docker images -q $IMAGE_NAME 2> /dev/null)" == "" ]]; then + echo "Error starting Zenith image" + echo "Image $IMAGE_NAME not found locally." + echo "Aborting process..." + exit +fi + +docker run --rm -it --mount src=$ZFOLDER,target=/home/zenusr/Zenith,type=bind --net=host --env DISPLAY=$DISPLAY --env EXPERT_MODE=$EXPERTMODE --env RPC_SERVER=$RPCSERVER $IMAGE_NAME + +# End diff --git a/docker_files/cfg/runzenithrpc b/docker_files/cfg/runzenithrpc deleted file mode 100755 index db9a66c..0000000 --- a/docker_files/cfg/runzenithrpc +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -ZFOLDER=~/Zenith -IMAGE_NAME=zenithrpc-docker:0.7.0.0 - -for i in "$@" -do case $i in - -e=*|--expert=*) - EXPERTMODE="1" - ;; - *) - EXPERTMODE="0" - ;; -esac -done - -# Check if docker engine is running -if ! systemctl is-active --quiet docker ; then - echo "Docker is not active/installed, " - echo "Please activate docker before proceeding!!." - echo "Aborting process..." - exit -fi - -# Check if data folder exists -if [ ! -d "$ZFOLDER" ]; then - echo "Error starting Zenith RPC server image" - echo "Zenith configurtion and data folder ($ZFOLDER) does not exists." - echo "Aborting process..." - exit -fi - -# Check if the image exists locally -if [[ "$(docker images -q $IMAGE_NAME 2> /dev/null)" == "" ]]; then - echo "Error starting Zenith RPC server image" - echo "Image $IMAGE_NAME not found locally." - echo "Aborting process..." - exit -fi - -# Start image in detached mode -docker run --rm -d --mount src=$ZFOLDER,target=/home/zenusr/Zenith,type=bind --net=host --env EXPERT_MODE=$EXPERTMODE $IMAGE_NAME - -# End diff --git a/docker_files/cfg/zenith.cfg b/docker_files/cfg/zenith.cfg index 58e2bc4..9166789 100644 --- a/docker_files/cfg/zenith.cfg +++ b/docker_files/cfg/zenith.cfg @@ -1,5 +1,6 @@ nodeUser = "user" nodePwd = "superSecret" +nodePort = 8234 dbFileName = "zenith.db" zebraHost = "127.0.0.1" -zebraPort = 18232 +zebraPort = 8232 diff --git a/docker_files/dockerpkg b/docker_files/dockerpkg index bcdc985..02a6983 100755 --- a/docker_files/dockerpkg +++ b/docker_files/dockerpkg @@ -4,14 +4,21 @@ echo "Docker image package generator" echo if ! systemctl is-active --quiet docker ; then echo "Docker is not active/installed, " - echo "Please activate docker before proceeding!!." + echo "Please activate docker befor proceed!!." echo exit fi echo "Updating docker binary files ...." echo -echo "... copying zenith server to ./bin folder" +echo "... copying zenith to ./bin folder" +cp "../dist-newstyle/build/x86_64-linux/ghc-9.6.5/zenith-"$ZVERSION"/build/zenith/zenith" "bin/" +echo "... copying zenithserver to ./bin folder" cp "../dist-newstyle/build/x86_64-linux/ghc-9.6.5/zenith-"$ZVERSION"/build/zenithserver/zenithserver" "bin/" +echo "... copying assets folder to ./cfg folder" +if [ -d ./cfg/assets ]; then + rm -rf ./cfg/assets +fi +cp -r "../assets" "cfg/" echo "... copying librustzcash_wrapper.so to ./lib folder" cp "../zcash-haskell/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug/librustzcash_wrapper.so" "lib/" echo @@ -19,36 +26,36 @@ echo read -r -p "Do you want to create the docker image? [Y/n] " response case "$response" in [yY]) - if docker image ls | grep -q "zenithrpc-docker" ; then + if docker image ls | grep -q "zenith-docker" ; then echo "... removing previous docker image" - docker rmi -f "zenithrpc-docker:"$ZVERSION + docker rmi -f "zenith-docker:"$ZVERSION fi - echo "... creating zenithrpc-docker:"$ZVERSION" image" - docker build -t "zenithrpc-docker:"$ZVERSION . - echo "... docker image zenithrpc-docker:"$ZVERSION" created." - echo "... exporting zenithrpc-docker:"$ZVERSION" as .tar file" - docker save -o zenithrpc-docker_$ZVERSION.tar zenithrpc-docker:$ZVERSION - echo "... zenithrpc-docker:"$ZVERSION" image ready." + echo "... creating zenith-docker:"$ZVERSION" image" + docker build -t "zenith-docker:"$ZVERSION . + echo "... docker image zenith-docker:"$ZVERSION" created." + echo "... exporting zenith-docker:"$ZVERSION" as .tar file" + docker save -o zenith-docker_$ZVERSION.tar zenith-docker:$ZVERSION + echo "... zenith-docker:"$ZVERSION" image ready." echo "... creating distribution package file " - if [ -d zenithrpc-docker_$ZVERSION ]; then - rm -rf zenithrpc-docker_$ZVERSION + if [ -d zenith-docker_$ZVERSION ]; then + rm -rf zenith-docker_$ZVERSION fi echo "... creating distribution folder " - mkdir zenithrpc-docker_$ZVERSION + mkdir zenith-docker_$ZVERSION echo "... copying setup_docker script" chmod +x setup_docker - cp setup_docker zenithrpc-docker_$ZVERSION/ + cp setup_docker zenith-docker_$ZVERSION/ chmod -x setup_docker echo "... copying cfg folder" - cp -r cfg zenithrpc-docker_$ZVERSION/ + cp -r cfg zenith-docker_$ZVERSION/ echo "... moving docker image to distribution folder" - mv zenithrpc-docker_$ZVERSION.tar zenithrpc-docker_$ZVERSION/ - if [ -f zenithrpc-docker_$ZVERSION.7z ]; then - rm zenithrpc-docker_$ZVERSION.7z + mv zenith-docker_$ZVERSION.tar zenith-docker_$ZVERSION/ + if [ -f zenith-docker_$ZVERSION.7z ]; then + rm zenith-docker_$ZVERSION.7z fi - echo "... creating distribution package zenithrpc-docker_$ZVERSION.7z " - 7z a zenithrpc-docker_$ZVERSION.7z zenithrpc-docker_$ZVERSION - echo "... distribution file created. (zenithrpc-docker_$ZVERSION.tar.gz)" + echo "... creating distrigution package zenith-docker_$ZVERSION.7z " + 7z a zenith-docker_$ZVERSION.7z zenith-docker_$ZVERSION + echo "... distribution file created. (zenith-docker_$ZVERSION.tar.gz)" ;; *) echo "... docker image not created." diff --git a/docker_files/lib/librustzcash_wrapper.so b/docker_files/lib/librustzcash_wrapper.so index 1fb4bed..8164917 100755 Binary files a/docker_files/lib/librustzcash_wrapper.so and b/docker_files/lib/librustzcash_wrapper.so differ diff --git a/docker_files/lib/sapling-output.params b/docker_files/lib/sapling-output.params deleted file mode 100644 index 01760fa..0000000 Binary files a/docker_files/lib/sapling-output.params and /dev/null differ diff --git a/docker_files/lib/sapling-spend.params b/docker_files/lib/sapling-spend.params deleted file mode 100644 index b91cd77..0000000 Binary files a/docker_files/lib/sapling-spend.params and /dev/null differ diff --git a/docker_files/scripts/welcome.sh b/docker_files/scripts/welcome.sh index 758d5a3..8f98bf7 100644 --- a/docker_files/scripts/welcome.sh +++ b/docker_files/scripts/welcome.sh @@ -1,8 +1,8 @@ #!/bin/bash echo echo "=============================================" -echo "Welcome to Zenith RPC seerver enviroment" +echo "Welcome to Zenith Full Node Wallet enviroment" echo "v0.7.0.0" -echo "Vergara Technologies LLC" +echo "Expert mode" echo "=============================================" echo diff --git a/docker_files/setup_docker b/docker_files/setup_docker index 36d7f15..84cd0f1 100644 --- a/docker_files/setup_docker +++ b/docker_files/setup_docker @@ -1,14 +1,14 @@ #!/bin/bash ZVERSION="0.7.0.0" echo -echo "Zenith RPC Server Image Setup" +echo "Zenith Full Node Wallet and RPC-Server Docker Image Setup" echo echo "... testing if docker service is active.." if systemctl is-active --quiet docker; then echo "... Docker service active" echo if [ -d $HOME"/Zenith" ]; then - echo "Warning: Zenith Server configuration already exist, this procedure will create" + echo "Warning: Zenith configuration already exist, this procedure will create" echo " a new configuration file. Your previous configurarion " echo " will be saved as 'previous-zenith.cfg'. (a Backup is recommended)." echo @@ -30,28 +30,28 @@ if systemctl is-active --quiet docker; then echo "... creating Zenith folder" mkdir -p $HOME/Zenith/assets fi - if docker image ls | grep -q "zenithrpc-docker" ; then + if docker image ls | grep -q "zenith-docker" ; then echo "... removing previous docker image" - docker rmi -f "zenithrpc-docker:"$ZVERSION + docker rmi -f "zenith-docker:"$ZVERSION fi - echo "... loading zenithrpc-docker:"$ZVERSION" image" - docker load < zenithrpc-docker_$ZVERSION.tar - echo "... docker image zenithrpc-docker:"$ZVERSION" loaded." + echo "... loading zenith-docker:"$ZVERSION" image" + docker load < zenith-docker_$ZVERSION.tar + echo "... docker image zenith-docker:"$ZVERSION" loaded." echo "... creating default configuration" cp cfg/zenith.cfg $HOME/Zenith/ echo "... copying zenith assets to Zenith folder." - cp -r cfg/assets $HOME/Zenith/assets + cp -r cfg/assets $HOME/Zenith if ! [ -d $HOME/.local/bin ]; then echo "... creating $HOME/.local/bin folder" mkdir -p $HOME/.local/bin else echo "... $HOME/.local/bin exists" fi - if [ -f $HOME/.local/bin/runzenithrpc ]; then - rm $HOME/.local/bin/runzenithrpc + if [ -f $HOME/.local/bin/runzenith ]; then + rm $HOME/.local/bin/runzenith fi - echo "... copying runzenithrpc to $HOME/.local/bin" - cp cfg/runzenithrpc $HOME/.local/bin/ + echo "... copying runzenith to $HOME/.local/bin" + cp cfg/runzenith $HOME/.local/bin/ if ! echo $PATH | grep -q $HOME/.local/bin ; then echo PATH=$PATH:$HOME/.local/bin | tee -a $HOME/.bashrc echo "... reloading configuration ...." @@ -60,11 +60,11 @@ if systemctl is-active --quiet docker; then echo "... PATH=$PATH" fi echo - echo "To start Zenith RPC server execute 'runzenithrpc' from the command line." + echo "To start zenith execute 'runzenith' from the command line." else echo "... Docker service is not active" echo "... Please activate Docker service first." fi echo echo "Done" -echo \ No newline at end of file +echo diff --git a/zcash-haskell b/zcash-haskell index 7965dc3..d45bd7d 160000 --- a/zcash-haskell +++ b/zcash-haskell @@ -1 +1 @@ -Subproject commit 7965dc38c48da348f503a52ee10042fffc43f32c +Subproject commit d45bd7dcf3c3cf4e893900a1774d24b14bf56591