6. Frequently Asked Questions

  1. Q: Is your currency available in docker container (link to docker container)?
    A: https://hub.docker.com/repository/docker/zencash/zen-node Dockerfiles and documentation at https://github.com/ZencashOfficial/zen-node-docker. The Dockerfiles rely on our official binary debian packages from https://github.com/ZencashOfficial/zen/releases/latest,
    If building Dockerfiles from source is your preferred way, they can be provided as well.
  2. Q: If there is no docker file provide a step by step instruction
    A: Please see the integration guide if not using the docker container.
  3. Q: What algorithm is used by your currency(POW/POS…) ?
    A: PoW, Equihash-200,9
  4. Q: Do you have coinbase transactions? If yes, how can one find a coinbase transaction in the block?
    A: Coinbase transactions are always the first transaction included in a block. Coinbase transactions are labeled as newly generated coins within each block: https://explorer.zensystem.io/tx/0c5e02b0bc97b901b53f639c793fb7f11f4d44e81752bbe0a5ae7212cfb8c102
  5. Q: Links to your node and wallets Github
    A: https://github.com/ZencashOfficial/zen
  6. Q: What is the name of the binary of node daemon, node cli, wallet (binary, if there is one)?
    A: Node daemon: `zend`. Node cli: `zen-cli`
  7. Q: Are there any additional services that we need to start?
    A: No, but before the first start the trusted setup parameters (same as Zcash) have to be downloaded, ./zcutil/fetch-params.sh can be used for this (the docker container does this automatically).
  8. Q: What is the name of the config file, and where is it located?
    A: It is located in the default datadir and the name of config file ~/.zen/zen.conf
  9. Q: How do you create a wallet? Which file format is it?
    A: wallet.dat is using BDB 6.2.23, no HD wallet support. A wallet with 100 pregenerated private keys/keypool/change addresses is automatically generated at the first startup of zend. If more keys are preferred start with -keypool=<no. keys>.
  10. Q: How do you back it up?
    A: Set -exportdir=./path, zen-cli dumpwallet and zen-cli z_exportwallet commands can then be used to backup private keys, for more please see the integration guide.
  11. Q: Are there any pitfalls about your node?
    A: Some error messages that can safely be ignored turn up in debug log, e.g.:
    “ERROR: AcceptToMemoryPool: joinsplit requirements not met” This means someone on the network sent a shielded transaction that was rejected by our node because it is invalid.
    “script / standard.cpp: Solver (): 215 - OP_CHECKBLOCKATHEIGHT nHeight not legal [473246], chainActive height: 473122” while the node is syncing for the first time or on startup, messages like this can occur. This is a contextual check which can fail when zend’s context is not the latest block height, this is harmless.
  12. Q: Is there a library for your currency API for PHP? If yes, is it published on packagist? if not, please share a link to it
    A: No library in PHP, but we do have an actively maintained javascript library at https://github.com/ZencashOfficial/zencashjs / https://www.npmjs.com/package/zencashjs that can be used in conjunction with block explorers using https://github.com/ZencashOfficial/insight-api-zen.
  13. Q: Does your currency have blocks? if yes, how does one get the current highest node block?
    A: Here are several API endpoints to get the latest block height:
    https://explorer.zensystem.io/api/sync (most efficient if you only need to know the latest block height)
    Using zen-cli you can run ‘zen-cli getbestblock’ or ‘zen-cli getblock “$(zen-cli getbestblock)”’ or ‘zen-cli getblockheader “$(zen-cli getbestblockhash)”’.
  14. Q: On sending a transaction - does one need to manually sign your transaction, or is it handled by php lib / currency node? If it's manual, please share an instruction
    A: Only if you use the “createrawtransaction” command you will have to manually sign using “signrawtransaction”. If using the zencashjs library, signatures need to be handled manually (examples in README.md).
  15. Q: Does your currency node have the possibility to send transactions from multiple addresses to multiple addresses (like bitcoin and its forks)? Does one need to pass "from address" (payer account/address) or will it be resolved by php lib / currency node?
    A: RPC methods “sendmany” and “z_sendmany” can send to multiple addresses with a single fromaddress, “sendtoaddress” can send to a single address, where the fromaddresses can’t be predetermined. Please see “zen-cli help” and the integration guide for details.
  16. Q: How do I get all transactions? Is there a way to get it by block? Is there a way to filter them? (for example, by incoming and outcoming)
    A: RPC calls of relevance “listtransactions”, “listunspent”, “listreceivedbyaddress”, “listreceivedbyaccount”, “listaddressgroupings”.
  17. Q: How does one get transaction by transaction hash?
    A: ‘zen-cli gettransaction “txhash”’ for in wallet tx, ‘zen-cli getrawtransaction “txhash” 1’ for any transaction.
  18. Q: How many digits after decimal your currency have?
    A: 8 - same as Bitcoin
  19. Q: How do I create an address/account? Is there a limit to create addresses? Is there a fee for creating addresses?
    A: zen-cli getnewaddress, use of accounts is deprecated. Please see the integration guide. There is no fee for creating new addresses.
  20. Q: Does your currency have a memo/payment message/payment ID? If yes, give an example of getting transaction memo/payment using your node and curl (or provide a piece of php code if it can be handled by php lib). Which part of the response handles this?
    A: No memo as e.g. on XLM, though shielded (private) transactions have an optional 512byte memo field that can be used to exchange private messages. Compared to e.g. XLM, this has nothing to do with determining the destination of a transaction.
  21. Q: How to validate address/account? If there is a memo then - How to validate memo/payment ID?
    A: zen-cli validateaddress
  22. Q: Please share a regex to validate address/account OR memo/payment ID. Please use regex101.com and provide a link
    A: https://regex101.com/r/KB0CrE/1 Because normal testnet addresses and some mainnet multisignature addresses can both start with “zt”, we recommend not using a regular expression for address validation, instead base58check decode the addresses and check the prefix. Example JS code (this probably works in PHP https://pecl.php.net/package/base58):
    const bs58check = require('bs58check');
    const address = ….;
    try {
    prefix = bs58check.decode(address).toString('hex').slice(0, 4);
    } catch (err) {
    console.log(“Address decode failed with: “ + err);
    if (prefix === '2089' || prefix === '2096') {
    console.log(“Valid mainnet address”);
    } else if (prefix === '2098' || prefix === '2092') {
    console.log(“Valid testnet address”);
    } else {
    console.log(“Invalid address”);
  23. Q: Are there transaction fees? If yes, in what currency is it payable? How to calculate a fee for a certain transaction? If the fee is fixed, is it hard coded? Can one get the fee via API?
    A: Transaction fees are automatically calculated per kB, however, we typically recommend setting a standard fee of 0.0001 ZEN.
  24. Q: Do you have only one currency?
    A: Only one currency - ZEN
  25. Q: Can you send 2 transfers in one transaction for one address? Is an address unique per transaction?
    A: Addresses are not unique per transaction. We operate a standard UTXO model, just like ZEC or BTC.

  • Spanish/Español

© 2020 Horizen. All rights reserved.