2018-02-27 14:45:54 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
PEERPLAYSD="/usr/local/bin/witness_node"
|
|
|
|
|
|
|
|
|
|
# For blockchain download
|
|
|
|
|
VERSION=`cat /etc/peerplays/version`
|
|
|
|
|
|
|
|
|
|
## Supported Environmental Variables
|
|
|
|
|
#
|
|
|
|
|
# * $PEERPLAYSD_SEED_NODES
|
|
|
|
|
# * $PEERPLAYSD_RPC_ENDPOINT
|
|
|
|
|
# * $PEERPLAYSD_PLUGINS
|
|
|
|
|
# * $PEERPLAYSD_REPLAY
|
|
|
|
|
# * $PEERPLAYSD_RESYNC
|
|
|
|
|
# * $PEERPLAYSD_P2P_ENDPOINT
|
|
|
|
|
# * $PEERPLAYSD_WITNESS_ID
|
|
|
|
|
# * $PEERPLAYSD_PRIVATE_KEY
|
NFT Marketplace HRP Beatrice Merge (#371)
* private-key option update
* ppy marketplace 1 - add evaluators and objects
* NFT object and basic operations
* ci: update .gitlab-ci.yml
* ci: update .gitlab-ci.yml
* NFT evaluators and basic tests, no evaluator checks
* Evaluator checks in place
* ppy marketplace 2 - batch sale, offer_object escrow
* Database API
* Wallet API
* NFT metadata implemented
* Fix NFT tests
* Database API for NFT metadata and enumerables
* ppy marketplace 4 - Add tests NFT+Marketplace
* ppy marketplace 5 - Add revenue split
* ppy marketplace 6 - Remove unnecessary files
* ppy marketplace 7 - Add db, wallet changes and some NFT fixes
* ppy marketplace 8 - Add pagination for list APIs
* ci: update .gitlab-ci.yml
* New DB API, list all NFTs, list NFTs by owner
* Marketplace + NFT + RBAC (#368)
* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
* Fix nft_get_token_uri returning empty string
* Fix nft_mint_evaluator to save token_uri
* Fix cli_wallet to properly pass metadata id for nft_create
* ppy marketplace 9 - FC_REFLECT offer create op
* Add stricter checks to NFTs
* GPOS2 HF - Handle rolling period on missing blocks (#369)
* Mainnet chain halt 5050 Issue (#370)
* Unlisting offers, add result in offer history object
* Reverting genesis.json wrong commit
* Add non-transferable non-sellable properties to NFTs
* Review comments - change variable names, use scoped enums
* nft_metadata_update changes
* NFT HF checks and op fee addition changes
* NFT make revenue_split integer from double
* revenue_split condition check allow zero or above
* Peerplays Marketplace + NFT (#367)
* ppy marketplace 1 - add evaluators and objects
* NFT object and basic operations
* ci: update .gitlab-ci.yml
* ci: update .gitlab-ci.yml
* NFT evaluators and basic tests, no evaluator checks
* Evaluator checks in place
* ppy marketplace 2 - batch sale, offer_object escrow
* Database API
* Wallet API
* NFT metadata implemented
* Fix NFT tests
* Database API for NFT metadata and enumerables
* ppy marketplace 4 - Add tests NFT+Marketplace
* ppy marketplace 5 - Add revenue split
* ppy marketplace 6 - Remove unnecessary files
* ppy marketplace 7 - Add db, wallet changes and some NFT fixes
* ppy marketplace 8 - Add pagination for list APIs
* New DB API, list all NFTs, list NFTs by owner
* Marketplace + NFT + RBAC (#368)
* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
* Fix nft_get_token_uri returning empty string
* Fix nft_mint_evaluator to save token_uri
* Fix cli_wallet to properly pass metadata id for nft_create
* ppy marketplace 9 - FC_REFLECT offer create op
* Add stricter checks to NFTs
* Unlisting offers, add result in offer history object
* Reverting genesis.json wrong commit
* Add non-transferable non-sellable properties to NFTs
* Review comments - change variable names, use scoped enums
* nft_metadata_update changes
* NFT HF checks and op fee addition changes
* NFT make revenue_split integer from double
* revenue_split condition check allow zero or above
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
* Beatrice NFT HF
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
2020-08-10 15:42:59 +00:00
|
|
|
# * $PEERPLAYSD_DEBUG_PRIVATE_KEY
|
2018-02-27 14:45:54 +00:00
|
|
|
# * $PEERPLAYSD_TRACK_ACCOUNTS
|
|
|
|
|
# * $PEERPLAYSD_PARTIAL_OPERATIONS
|
|
|
|
|
# * $PEERPLAYSD_MAX_OPS_PER_ACCOUNT
|
|
|
|
|
# * $PEERPLAYSD_TRUSTED_NODE
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
ARGS=""
|
|
|
|
|
# Translate environmental variables
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_SEED_NODES" ]]; then
|
|
|
|
|
for NODE in $PEERPLAYSD_SEED_NODES ; do
|
|
|
|
|
ARGS+=" --seed-node=$NODE"
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_RPC_ENDPOINT" ]]; then
|
|
|
|
|
ARGS+=" --rpc-endpoint=${PEERPLAYSD_RPC_ENDPOINT}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_REPLAY" ]]; then
|
|
|
|
|
ARGS+=" --replay-blockchain"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_RESYNC" ]]; then
|
|
|
|
|
ARGS+=" --resync-blockchain"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_P2P_ENDPOINT" ]]; then
|
|
|
|
|
ARGS+=" --p2p-endpoint=${PEERPLAYSD_P2P_ENDPOINT}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_WITNESS_ID" ]]; then
|
|
|
|
|
ARGS+=" --witness-id=$PEERPLAYSD_WITNESS_ID"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_PRIVATE_KEY" ]]; then
|
|
|
|
|
ARGS+=" --private-key=$PEERPLAYSD_PRIVATE_KEY"
|
|
|
|
|
fi
|
|
|
|
|
|
NFT Marketplace HRP Beatrice Merge (#371)
* private-key option update
* ppy marketplace 1 - add evaluators and objects
* NFT object and basic operations
* ci: update .gitlab-ci.yml
* ci: update .gitlab-ci.yml
* NFT evaluators and basic tests, no evaluator checks
* Evaluator checks in place
* ppy marketplace 2 - batch sale, offer_object escrow
* Database API
* Wallet API
* NFT metadata implemented
* Fix NFT tests
* Database API for NFT metadata and enumerables
* ppy marketplace 4 - Add tests NFT+Marketplace
* ppy marketplace 5 - Add revenue split
* ppy marketplace 6 - Remove unnecessary files
* ppy marketplace 7 - Add db, wallet changes and some NFT fixes
* ppy marketplace 8 - Add pagination for list APIs
* ci: update .gitlab-ci.yml
* New DB API, list all NFTs, list NFTs by owner
* Marketplace + NFT + RBAC (#368)
* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
* Fix nft_get_token_uri returning empty string
* Fix nft_mint_evaluator to save token_uri
* Fix cli_wallet to properly pass metadata id for nft_create
* ppy marketplace 9 - FC_REFLECT offer create op
* Add stricter checks to NFTs
* GPOS2 HF - Handle rolling period on missing blocks (#369)
* Mainnet chain halt 5050 Issue (#370)
* Unlisting offers, add result in offer history object
* Reverting genesis.json wrong commit
* Add non-transferable non-sellable properties to NFTs
* Review comments - change variable names, use scoped enums
* nft_metadata_update changes
* NFT HF checks and op fee addition changes
* NFT make revenue_split integer from double
* revenue_split condition check allow zero or above
* Peerplays Marketplace + NFT (#367)
* ppy marketplace 1 - add evaluators and objects
* NFT object and basic operations
* ci: update .gitlab-ci.yml
* ci: update .gitlab-ci.yml
* NFT evaluators and basic tests, no evaluator checks
* Evaluator checks in place
* ppy marketplace 2 - batch sale, offer_object escrow
* Database API
* Wallet API
* NFT metadata implemented
* Fix NFT tests
* Database API for NFT metadata and enumerables
* ppy marketplace 4 - Add tests NFT+Marketplace
* ppy marketplace 5 - Add revenue split
* ppy marketplace 6 - Remove unnecessary files
* ppy marketplace 7 - Add db, wallet changes and some NFT fixes
* ppy marketplace 8 - Add pagination for list APIs
* New DB API, list all NFTs, list NFTs by owner
* Marketplace + NFT + RBAC (#368)
* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
* Fix nft_get_token_uri returning empty string
* Fix nft_mint_evaluator to save token_uri
* Fix cli_wallet to properly pass metadata id for nft_create
* ppy marketplace 9 - FC_REFLECT offer create op
* Add stricter checks to NFTs
* Unlisting offers, add result in offer history object
* Reverting genesis.json wrong commit
* Add non-transferable non-sellable properties to NFTs
* Review comments - change variable names, use scoped enums
* nft_metadata_update changes
* NFT HF checks and op fee addition changes
* NFT make revenue_split integer from double
* revenue_split condition check allow zero or above
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
* Beatrice NFT HF
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
2020-08-10 15:42:59 +00:00
|
|
|
if [[ ! -z "$PEERPLAYSD_DEBUG_PRIVATE_KEY" ]]; then
|
|
|
|
|
ARGS+=" --debug-private-key=$PEERPLAYSD_DEBUG_PRIVATE_KEY"
|
|
|
|
|
fi
|
|
|
|
|
|
2018-02-27 14:45:54 +00:00
|
|
|
if [[ ! -z "$PEERPLAYSD_TRACK_ACCOUNTS" ]]; then
|
|
|
|
|
for ACCOUNT in $PEERPLAYSD_TRACK_ACCOUNTS ; do
|
|
|
|
|
ARGS+=" --track-account=$ACCOUNT"
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_PARTIAL_OPERATIONS" ]]; then
|
|
|
|
|
ARGS+=" --partial-operations=${PEERPLAYSD_PARTIAL_OPERATIONS}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_MAX_OPS_PER_ACCOUNT" ]]; then
|
|
|
|
|
ARGS+=" --max-ops-per-account=${PEERPLAYSD_MAX_OPS_PER_ACCOUNT}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_TRUSTED_NODE" ]]; then
|
|
|
|
|
ARGS+=" --trusted-node=${PEERPLAYSD_TRUSTED_NODE}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
## Link the peerplays config file into home
|
|
|
|
|
## This link has been created in Dockerfile, already
|
|
|
|
|
ln -f -s /etc/peerplays/config.ini /var/lib/peerplays
|
2021-12-07 16:22:05 +00:00
|
|
|
ln -f -s /etc/peerplays/logging.ini /var/lib/peerplays
|
2018-02-27 14:45:54 +00:00
|
|
|
|
|
|
|
|
# Plugins need to be provided in a space-separated list, which
|
|
|
|
|
# makes it necessary to write it like this
|
|
|
|
|
if [[ ! -z "$PEERPLAYSD_PLUGINS" ]]; then
|
|
|
|
|
$PEERPLAYSD --data-dir ${HOME} ${ARGS} ${PEERPLAYSD_ARGS} --plugins "${PEERPLAYSD_PLUGINS}"
|
|
|
|
|
else
|
|
|
|
|
$PEERPLAYSD --data-dir ${HOME} ${ARGS} ${PEERPLAYSD_ARGS}
|
|
|
|
|
fi
|