Skip to content
/ tsuki Public

TSUKI is core blockchain, managing all on-chain logic, including processing transactions and state transitions. TSUKI iterates upon Tendermint consensus with its own Multi-Bonded Proof of Stake (MBPoS), which enables the staking of multiple whitelisted assets as well as native token and natively supported Liquid Staking Derivatives.

Notifications You must be signed in to change notification settings

0xtinkle/tsuki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tsuki

TSUKI Relay Chain

Quick setup from Github

# dont forget to specify branch name or hash
cd $HOME && rm -fvr ./tsuki && TSUKI_BRANCH="<branch-name-or-checkout-hash>" && \
 git clone https://github.com/TsukiCore/tsuki.git -b $TSUKI_BRANCH && \
 cd ./tsuki && chmod -R 777 ./scripts && make proto-gen && \
 make install && echo "SUCCESS installed tsukid $(tsukid version)" || echo "FAILED"

Signatures

All files in TSUKI repositories are always signed with cosign, you should NEVER install anything on your machine unless you verified integrity of the files!

Cosign requires simple initial setup of the signer keys described more precisely here

# install cosign
COSIGN_VERSION="v1.7.2" && \
if [[ "$(uname -m)" == *"ar"* ]] ; then ARCH="arm64"; else ARCH="amd64" ; fi && echo $ARCH && \
PLATFORM=$(uname) && FILE=$(echo "cosign-${PLATFORM}-${ARCH}" | tr '[:upper:]' '[:lower:]') && \
 wget https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/$FILE && chmod +x -v ./$FILE && \
 mv -fv ./$FILE /usr/local/bin/cosign && cosign version

# save TSUKI public cosign key
KEYS_DIR="/usr/keys" && TSUKI_COSIGN_PUB="${KEYS_DIR}/tsuki-cosign.pub" && \
mkdir -p $KEYS_DIR  && cat > ./cosign.pub << EOL
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/IrzBQYeMwvKa44/DF/HB7XDpnE+
f+mU9F/Qbfq25bBWV2+NlYMJv3KvKHNtu3Jknt6yizZjUV4b8WGfKBzFYw==
-----END PUBLIC KEY-----
EOL

# download desired files and the corresponding .sig file from: https://github.com/TsukiCore/tools/releases

# verify signature of downloaded files
cosign verify-blob --key=$TSUKI_COSIGN_PUB--signature=./<file>.sig ./<file>

Install bash-utils

Bash-utils is a TSUKI tool that helps to simplify shell scripts and various bash commands that you might need to run

# Install bash-utils.sh TSUKI tool to make downloads faster and easier
TOOLS_VERSION="v0.0.12.4" && mkdir -p /usr/keys && FILE_NAME="bash-utils.sh" && \
 if [ -z "$TSUKI_COSIGN_PUB" ] ; then TSUKI_COSIGN_PUB=/usr/keys/tsuki-cosign.pub ; fi && \
 echo -e "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/IrzBQYeMwvKa44/DF/HB7XDpnE+\nf+mU9F/Qbfq25bBWV2+NlYMJv3KvKHNtu3Jknt6yizZjUV4b8WGfKBzFYw==\n-----END PUBLIC KEY-----" > $TSUKI_COSIGN_PUB && \
 wget "https://github.com/TsukiCore/tools/releases/download/$TOOLS_VERSION/${FILE_NAME}" -O ./$FILE_NAME && \
 wget "https://github.com/TsukiCore/tools/releases/download/$TOOLS_VERSION/${FILE_NAME}.sig" -O ./${FILE_NAME}.sig && \
 cosign verify-blob --key="$TSUKI_COSIGN_PUB" --signature=./${FILE_NAME}.sig ./$FILE_NAME && \
 chmod -v 555 ./$FILE_NAME && ./$FILE_NAME bashUtilsSetup "/var/tsukiglob" && . /etc/profile && \
 echoInfo "Installed bash-utils $(bash-utils bashUtilsVersion)"

Quick setup from Releases

# TBD

Set environment variables

sh env.sh

Get version info

scripts/commands/version.sh

Adding more validators

scripts/commands/adding-validators.sh

Set ChangeTxFee permission

scripts/commands/set-permission.sh

Set network properties

scripts/commands/set-network-properties.sh

Set Execution Fee

scripts/commands/set-execution-fee.sh

Upsert token rates

scripts/commands/upsert-token-rates.sh

Upsert token alias

scripts/commands/upsert-token-alias.sh

Fee payment in foreign currency

scripts/commands/foreign-fee-payments.sh

Fee payment in foreign currency returning failure - execution fee in foreign currency

scripts/commands/foreign-fee-payments-failure-return.sh

Query permission of an address

scripts/commands/query-permission.sh

Query network properties

scripts/commands/query-network-properties.sh

Query execution fee

scripts/commands/query-execution-fee.sh

Query token alias

scripts/commands/query-token-alias.sh

Query token rate

scripts/commands/query-token-rate.sh

Query validator account

scripts/commands/query-validator.sh

Query for current frozen / unfronzen tokens

Notes: these values are valid only when specific network property is enabled scripts/commands/query-frozen-token.sh

Query poor network messages

scripts/commands/query-poor-network-messages.sh

Query signing infos per validator's consensus address

scripts/commands/query-signing-infos.sh

Common commands for governance process

scripts/commands/governance/common.sh

Set permission via governance process

scripts/commands/governance/assign-permission.sh

Upsert token alias via governance process

scripts/commands/governance/upsert-token-alias.sh

Upsert token rates via governance process

scripts/commands/governance/upsert-token-rates.sh

Commands for poor network management via governance process

scripts/commands/governance/poor-network-messages.sh

Freeze / unfreeze tokens via governance process

scripts/commands/governance/token-freeze.sh

Set network property proposal via governance process

scripts/commands/governance/set-network-property.sh

Set application upgrade proposal via governance process

scripts/commands/governance/upgrade-plan.sh

Export the status of chain before halt (should kill the daemon process at the time of genesis export) scripts/commands/export-state.sh

The script for creating new chain from exported state should be written or manual edition process is required. ChainId should be modified in this process.

For now, upgrade process requires manual conversion from old genesis to new genesis. At each time of upgrade, genesis upgrade command will be built and infra could run the command like tsukid genesis-migrate

Note: state export command is not exporting the upgrade plan and if all validators run with exported genesis with the previous binary, consensus failure won't happen.

Identity registrar

scripts/commands/identity-registrar.sh

Unjail via governance process

Modify genesis json to have jailed validator for Unjail testing Add jailed validator key to kms.

  tsukid keys add jailed_validator --keyring-backend=test --home=$HOME/.tsukid --recover
  "dish rather zoo connect cross inhale security utility occur spell price cute one catalog coconut sort shuffle palm crop surface label foster slender inherit"

scripts/commands/governance/unjail-validator.sh

New genesis file generation process from exported version

In order to manually generate new genesis file when the hard fork is activated, following steps should be taken:

  1. Export current genesis, e.g: tsukid export --home=
  2. Change chain-id to new_chain_id as indicated by the upgrade plan
  3. Replace current upgrade plan in the app_state.upgrade with next plan and set next plan to null

Using a command it can be done in this way.

  1. tsukid export > exported-genesis.json
  2. tsukid new-genesis-from-exported exported-genesis.json new-genesis.json --json-minimize=true

About

TSUKI is core blockchain, managing all on-chain logic, including processing transactions and state transitions. TSUKI iterates upon Tendermint consensus with its own Multi-Bonded Proof of Stake (MBPoS), which enables the staking of multiple whitelisted assets as well as native token and natively supported Liquid Staking Derivatives.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •