dkr002 - Docker - First version of docker_files folder

This commit is contained in:
Rene V. Vergara A. 2024-06-20 14:52:12 -04:00
parent eae4bfc949
commit 307f9ac8d7
11 changed files with 302 additions and 0 deletions

21
docker_files/Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM ubuntu:22.04
MAINTAINER Rene V. Vergara A. <rvergara59@kprotonmail.com>
RUN apt update
RUN apt -y install libxss-dev
RUN apt -y install libxrandr-dev
RUN apt -y install libsecp256k1-dev
RUN apt -y install xclip
RUN mkdir /home/zenith
RUN useradd -ms /bin/bash zenusr
COPY bash_rc_adm /root/.bashrc
COPY bash_rc_usr /home/zenusr/.bashrc
COPY zenith /usr/local/bin
COPY librustzcash_wrapper.so /usr/local/lib
COPY sapling-spend.params /usr/local/lib
COPY sapling-output.params /usr/local/lib
CMD ["/bin/bash"]

100
docker_files/bash_rc_adm Normal file
View file

@ -0,0 +1,100 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi
export LD_LIBRARY_PATH=/usr/local/lib

118
docker_files/bash_rc_usr Normal file
View file

@ -0,0 +1,118 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
export LD_LIBRARY_PATH=/usr/local/lib

Binary file not shown.

24
docker_files/runzenith Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash
ZFOLDER=~/Public/zenith
IMAGE_NAME=zenith-docker:0.5.3.0
# 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 -it --mount src=$ZFOLDER,target=/home/zenith,type=bind --net=host $IMAGE_NAME
# End

Binary file not shown.

Binary file not shown.

BIN
docker_files/zenith Executable file

Binary file not shown.

5
docker_files/zenith.cfg Normal file
View file

@ -0,0 +1,5 @@
nodeUser = "user"
nodePwd = "superSecret"
dbFilePath = "/home/zenith/zenith.db"
zebraHost = "127.0.0.1"
zebraPort = 18232

BIN
zenith.db Normal file

Binary file not shown.

34
zenith.log Normal file
View file

@ -0,0 +1,34 @@
[Debug] (4,"\201\161\215*\194o]\RS\204\218\138sl\vd\223\DC4\197\230\150^\141w\163\236\252\156<\157pd_,\140\227\219\227?\134\GS4\r\RS")
[Debug] Target block: 2850104
[Debug] Entity {entityKey = ZcashAccountKey {unZcashAccountKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = ZcashAccount {zcashAccountIndex = 0, zcashAccountWalletId = ZcashWalletKey {unZcashWalletKey = SqlBackendKey {unSqlBackendKey = 1}}, zcashAccountName = "First Account", zcashAccountOrchSpendKey = OrchardSpendingKey "\128+\139pz\228\SO\ACK\247\ACK\NAK\160,\219Z\238\SO\154h\167\r\ACKF\197\147\243v\171\231#\252\RS", zcashAccountSapSpendKey = SaplingSpendingKey "\ETX\208\178\ESC\216\NUL\NUL\NUL\128\204\233\193h\213\CAN\188(\200\DEL)\245\177\&9\241}\249\244\249c\161\USr@\220\198\166ou\156\152l\DEL\248?z\175\165\128\158\251\SYNi\202\DLE\191\228\190\186M\249\ACK,\b\186J\198\156IT\191\NAK\140\SOHw'\197\184D\163F\225\DC1\193:7m8\129t\f\EOTx\218kB\153\203-\EM\220k\NUL\ENQ\ACK\r\245\225\154\STX49\DC1\ENQ<\165=\FS\225\&27\250\"\139t\241\224\141\SUB_\196\192\220\249\136U\240\SYNH\196\253\255:\234~\194\156\231=B2O\135\173\156\147(\141\147\152*m\DC4\194\NUL\251\162\230\188\145", zcashAccountTPrivateKey = XPrvKey {depth = 3, parent = "1381de4d", index = 2147483648, chain = "d9b0e54b3ded0c4e81c7c1af2e646f5ccebb7782bbac2c3d0c78218916806e59", key = "0b0af7575f1816fe310265c41051ea9417796dd99b2887ba104e57400af3ec92"}}}
[Info] Valid Sapling spend params
[Info] Valid Sapling output params
[Debug] Read Sapling params
[Debug] 0
[Debug] selected notes
[Debug] [Entity {entityKey = WalletTrNoteKey {unWalletTrNoteKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = WalletTrNote {walletTrNoteTx = WalletTransactionKey {unWalletTransactionKey = SqlBackendKey {unSqlBackendKey = 1}}, walletTrNoteAccId = ZcashAccountKey {unZcashAccountKey = SqlBackendKey {unSqlBackendKey = 1}}, walletTrNoteAddress = WalletAddressKey {unWalletAddressKey = SqlBackendKey {unSqlBackendKey = 2}}, walletTrNoteValue = 2633291, walletTrNoteSpent = False, walletTrNoteScript = "v\169\DC4t\SYN;4\240\191L>\156\131\195\241\146\DLE\EM\237\220\NAK\ETX\SOH\136\172", walletTrNoteChange = False, walletTrNotePosition = 0}}]
[Debug] []
[Debug] []
[Debug] Calculating fee
[Debug] selected notes with fee15000
[Debug] [Entity {entityKey = WalletTrNoteKey {unWalletTrNoteKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = WalletTrNote {walletTrNoteTx = WalletTransactionKey {unWalletTransactionKey = SqlBackendKey {unSqlBackendKey = 1}}, walletTrNoteAccId = ZcashAccountKey {unZcashAccountKey = SqlBackendKey {unSqlBackendKey = 1}}, walletTrNoteAddress = WalletAddressKey {unWalletAddressKey = SqlBackendKey {unSqlBackendKey = 2}}, walletTrNoteValue = 2633291, walletTrNoteSpent = False, walletTrNoteScript = "v\169\DC4t\SYN;4\240\191L>\156\131\195\241\146\DLE\EM\237\220\NAK\ETX\SOH\136\172", walletTrNoteChange = False, walletTrNotePosition = 0}}]
[Debug] []
[Debug] []
[Debug] [OutgoingNote {on_kind = 4, on_key = "\128+\139pz\228\SO\ACK\247\ACK\NAK\160,\219Z\238\SO\154h\167\r\ACKF\197\147\243v\171\231#\252\RS", on_recipient = "\f$A\216\160\195+\ESCP\179)\154\SOH\241\224\201p\"\202\135\223p\246S\SOH\143\216\229h\b\224\246sUi\146\STXp\166\&6\t\185\160", on_amt = 2618291, on_memo = "", on_chg = True},OutgoingNote {on_kind = 4, on_key = "\128+\139pz\228\SO\ACK\247\ACK\NAK\160,\219Z\238\SO\154h\167\r\ACKF\197\147\243v\171\231#\252\RS", on_recipient = "\201\161\215*\194o]\RS\204\218\138sl\vd\223\DC4\197\230\150^\141w\163\236\252\156<\157pd_,\140\227\219\227?\134\GS4\r\RS", on_amt = 0, on_memo = "", on_chg = False}]
[Debug] (4,"\201\161\215*\194o]\RS\204\218\138sl\vd\223\DC4\197\230\150^\141w\163\236\252\156<\157pd_,\140\227\219\227?\134\GS4\r\RS")
[Debug] Target block: 2850115
[Debug] Entity {entityKey = ZcashAccountKey {unZcashAccountKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = ZcashAccount {zcashAccountIndex = 0, zcashAccountWalletId = ZcashWalletKey {unZcashWalletKey = SqlBackendKey {unSqlBackendKey = 1}}, zcashAccountName = "First Account", zcashAccountOrchSpendKey = OrchardSpendingKey "\128+\139pz\228\SO\ACK\247\ACK\NAK\160,\219Z\238\SO\154h\167\r\ACKF\197\147\243v\171\231#\252\RS", zcashAccountSapSpendKey = SaplingSpendingKey "\ETX\208\178\ESC\216\NUL\NUL\NUL\128\204\233\193h\213\CAN\188(\200\DEL)\245\177\&9\241}\249\244\249c\161\USr@\220\198\166ou\156\152l\DEL\248?z\175\165\128\158\251\SYNi\202\DLE\191\228\190\186M\249\ACK,\b\186J\198\156IT\191\NAK\140\SOHw'\197\184D\163F\225\DC1\193:7m8\129t\f\EOTx\218kB\153\203-\EM\220k\NUL\ENQ\ACK\r\245\225\154\STX49\DC1\ENQ<\165=\FS\225\&27\250\"\139t\241\224\141\SUB_\196\192\220\249\136U\240\SYNH\196\253\255:\234~\194\156\231=B2O\135\173\156\147(\141\147\152*m\DC4\194\NUL\251\162\230\188\145", zcashAccountTPrivateKey = XPrvKey {depth = 3, parent = "1381de4d", index = 2147483648, chain = "d9b0e54b3ded0c4e81c7c1af2e646f5ccebb7782bbac2c3d0c78218916806e59", key = "0b0af7575f1816fe310265c41051ea9417796dd99b2887ba104e57400af3ec92"}}}
[Info] Valid Sapling spend params
[Info] Valid Sapling output params
[Debug] Read Sapling params
[Debug] 60000
[Debug] selected notes
[Debug] []
[Debug] []
[Debug] [Entity {entityKey = WalletOrchNoteKey {unWalletOrchNoteKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = WalletOrchNote {walletOrchNoteTx = WalletTransactionKey {unWalletTransactionKey = SqlBackendKey {unSqlBackendKey = 2}}, walletOrchNoteAccId = ZcashAccountKey {unZcashAccountKey = SqlBackendKey {unSqlBackendKey = 1}}, walletOrchNoteValue = 2618291, walletOrchNoteRecipient = "\f$A\216\160\195+\ESCP\179)\154\SOH\241\224\201p\"\202\135\223p\246S\SOH\143\216\229h\b\224\246sUi\146\STXp\166\&6\t\185\160", walletOrchNoteMemo = "", walletOrchNoteSpent = False, walletOrchNoteNullifier = 33923c51991cf70c0c89608e3fd6c8eb1532f5212abf6a8a9288016114096429, walletOrchNotePosition = 39524, walletOrchNoteWitness = 01ded32eba5a74068b36f8bfdf4895f468761cc2664f476fbe74d128f141736910001f0001383937212c0f6bf692fd132e066a19751503507c63c5f6cf9b3f9008e6f9591d000001e4a78a92030fba6872942dd16b9c9b10a04c6afecd855776e16ef015d53b461b01ebdf02218e6b27c24146df589d500691a9c41fa7856829d32daf36e3aad21401000001746e6bc066a10e7f80a9ff8993dcb25c819edd64f2ca10ac248ef7848d41450500011e6191f91b3fceb62dc881a156e1b9d2e88e09dca25093cf9c4936c8869fb41a013bf8b923e4187754e85175748d9cce4824a6787e4258977b5bfe1ba59012c032000001f3bbdc62260c4fca5c84bf3487246d4542da48eeeec8ec40c1029b6908eef83c0000000000000000000000000000000001e794269c5aa3410fb967710bb7e5a0a0ba874c9e1bd3448ac31d84265005321700, walletOrchNoteChange = True, walletOrchNoteWitPos = OrchActionKey {unOrchActionKey = SqlBackendKey {unSqlBackendKey = 4}}, walletOrchNoteRho = "\EOTm\180\185k\201a\210\244\168?\184\154\204\SUB\235\152,\ACKQ\219_M\216\&3\231\143\RS\191\157&\ETB", walletOrchNoteRseed = Rseed {rs_kind = 3, rs_bytes = "m\138\&6my\133\205\174\132)\174\254\153t(A\b\254\168\140\173\216\182\ENQq\232i\GSv\242Ev"}}}]
[Debug] Calculating fee
[Debug] selected notes with fee10000
[Debug] []
[Debug] []
[Debug] [Entity {entityKey = WalletOrchNoteKey {unWalletOrchNoteKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = WalletOrchNote {walletOrchNoteTx = WalletTransactionKey {unWalletTransactionKey = SqlBackendKey {unSqlBackendKey = 2}}, walletOrchNoteAccId = ZcashAccountKey {unZcashAccountKey = SqlBackendKey {unSqlBackendKey = 1}}, walletOrchNoteValue = 2618291, walletOrchNoteRecipient = "\f$A\216\160\195+\ESCP\179)\154\SOH\241\224\201p\"\202\135\223p\246S\SOH\143\216\229h\b\224\246sUi\146\STXp\166\&6\t\185\160", walletOrchNoteMemo = "", walletOrchNoteSpent = False, walletOrchNoteNullifier = 33923c51991cf70c0c89608e3fd6c8eb1532f5212abf6a8a9288016114096429, walletOrchNotePosition = 39524, walletOrchNoteWitness = 01ded32eba5a74068b36f8bfdf4895f468761cc2664f476fbe74d128f141736910001f0001383937212c0f6bf692fd132e066a19751503507c63c5f6cf9b3f9008e6f9591d000001e4a78a92030fba6872942dd16b9c9b10a04c6afecd855776e16ef015d53b461b01ebdf02218e6b27c24146df589d500691a9c41fa7856829d32daf36e3aad21401000001746e6bc066a10e7f80a9ff8993dcb25c819edd64f2ca10ac248ef7848d41450500011e6191f91b3fceb62dc881a156e1b9d2e88e09dca25093cf9c4936c8869fb41a013bf8b923e4187754e85175748d9cce4824a6787e4258977b5bfe1ba59012c032000001f3bbdc62260c4fca5c84bf3487246d4542da48eeeec8ec40c1029b6908eef83c0000000000000000000000000000000001e794269c5aa3410fb967710bb7e5a0a0ba874c9e1bd3448ac31d84265005321700, walletOrchNoteChange = True, walletOrchNoteWitPos = OrchActionKey {unOrchActionKey = SqlBackendKey {unSqlBackendKey = 4}}, walletOrchNoteRho = "\EOTm\180\185k\201a\210\244\168?\184\154\204\SUB\235\152,\ACKQ\219_M\216\&3\231\143\RS\191\157&\ETB", walletOrchNoteRseed = Rseed {rs_kind = 3, rs_bytes = "m\138\&6my\133\205\174\132)\174\254\153t(A\b\254\168\140\173\216\182\ENQq\232i\GSv\242Ev"}}}]
[Debug] [OutgoingNote {on_kind = 4, on_key = "\128+\139pz\228\SO\ACK\247\ACK\NAK\160,\219Z\238\SO\154h\167\r\ACKF\197\147\243v\171\231#\252\RS", on_recipient = "\f$A\216\160\195+\ESCP\179)\154\SOH\241\224\201p\"\202\135\223p\246S\SOH\143\216\229h\b\224\246sUi\146\STXp\166\&6\t\185\160", on_amt = 2548291, on_memo = "", on_chg = True},OutgoingNote {on_kind = 4, on_key = "\128+\139pz\228\SO\ACK\247\ACK\NAK\160,\219Z\238\SO\154h\167\r\ACKF\197\147\243v\171\231#\252\RS", on_recipient = "\201\161\215*\194o]\RS\204\218\138sl\vd\223\DC4\197\230\150^\141w\163\236\252\156<\157pd_,\140\227\219\227?\134\GS4\r\RS", on_amt = 60000, on_memo = "", on_chg = False}]