Skip to content
Permalink
Browse files

RUN

  • Loading branch information...
bitzec committed Aug 30, 2018
1 parent ffd5687 commit 9e8eb471d29c7551620b7d56c1ce36d41a4b6cad
@@ -149,7 +149,7 @@ endif
dist_bin_SCRIPTS = zcutil/fetch-params.sh
dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh

EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/zcash $(DIST_DOCS) $(BIN_CHECKS)
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/bitzec $(DIST_DOCS) $(BIN_CHECKS)

install-exec-hook:
mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
@@ -27,7 +27,33 @@ blockchain has reached a significant size.
See important security warnings on the
[Security Information page](https://z.cash/support/security/).

**Zcash is experimental and a work-in-progress.** Use at your own risk.
```{r, engine='bash'}
# Clone Bitzec Repository
git clone https://github.com/bitzec/bitzec.git
# Build
cd bitzec/
./zcutil/build.sh -j$(nproc)
# fetch key
./zcutil/fetch-params.sh
# Run
./src/bitzecd
# Test getting information about the network
cd src/
./bitzec-cli getmininginfo
# Test creating new transparent address
./bitzec-cli getnewaddress
# Test creating new private address
./bitzec-cli z_getnewaddress
# Test checking transparent balance
./bitzec-cli getbalance
# Test checking total balance
./bitcoinz-cli z_gettotalbalance
# Check all available wallet commands
./bitzec-cli help
# Get more info about a single wallet command
./bitzec-cli help "The-command-you-want-to-learn-more-about"
./bitzec-cli help "getbalance"
```

#### :ledger: Deprecation Policy

@@ -52,7 +78,7 @@ Participation in the Zcash project is subject to a

### Building

Build Zcash along with most dependencies from source by running:
Build Bitzec along with most dependencies from source by running:

```
./zcutil/build.sh -j$(nproc)
@@ -25,8 +25,7 @@ reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful. Note that contributors may be volunteers
who do not represent Zcash Company. They are free to express their own
opinions so long as they adhere to these guidelines.
who do

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
@@ -938,6 +938,7 @@ esac
echo
echo "Options used to compile and link:"
echo " with wallet = $enable_wallet"
echo " with rust = $enable_rust"
echo " with proton = $use_proton"
echo " with zmq = $use_zmq"
echo " with test = $use_tests"
@@ -27,7 +27,7 @@ extern const std::string CURRENCY_UNIT;
* critical; in unusual circumstances like a(nother) overflow bug that allowed
* for the creation of coins out of thin air modification could lead to a fork.
* */
static const CAmount MAX_MONEY = 21000000 * COIN;
static const CAmount MAX_MONEY = 7000000001 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

/** Type-safe wrapper class to for fee rates
@@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Zcash"
VALUE "FileDescription", "zcash-cli (JSON-RPC client for Zcash)"
VALUE "CompanyName", "Bitzec"
VALUE "FileDescription", "bitzec-cli (JSON-RPC client for Bitzec)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "zcash-cli"
VALUE "InternalName", "bitzec-cli"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "zcash-cli.exe"
VALUE "ProductName", "zcash-cli"
VALUE "OriginalFilename", "bitzec-cli.exe"
VALUE "ProductName", "bitzec-cli"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
@@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Zcash"
VALUE "FileDescription", "zcash-tx (CLI Zcash transaction editor utility)"
VALUE "CompanyName", "Bitzec"
VALUE "FileDescription", "bitzec-tx (CLI Bitzec transaction editor utility)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "zcash-tx"
VALUE "InternalName", "bitzec-tx"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "zcash-tx.exe"
VALUE "ProductName", "zcash-tx"
VALUE "OriginalFilename", "bitzec-tx.exe"
VALUE "ProductName", "bitzec-tx"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
@@ -48,10 +48,10 @@ static int AppInitRawTx(int argc, char* argv[])
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help"))
{
// First part of help message is specific to this utility
std::string strUsage = _("Zcash zcash-tx utility version") + " " + FormatFullVersion() + "\n\n" +
std::string strUsage = _("Bitzec bitzec-tx utility version") + " " + FormatFullVersion() + "\n\n" +
_("Usage:") + "\n" +
" zcash-tx [options] <hex-tx> [commands] " + _("Update hex-encoded zcash transaction") + "\n" +
" zcash-tx [options] -create [commands] " + _("Create hex-encoded zcash transaction") + "\n" +
" bitzec-tx [options] <hex-tx> [commands] " + _("Update hex-encoded zcash transaction") + "\n" +
" bitzec-tx [options] -create [commands] " + _("Create hex-encoded zcash transaction") + "\n" +
"\n";

fprintf(stdout, "%s", strUsage.c_str());
@@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Zcash"
VALUE "FileDescription", "zcashd (Zcash node with a JSON-RPC server)"
VALUE "CompanyName", "Bitzec"
VALUE "FileDescription", "bitzecd (Zcash node with a JSON-RPC server)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "zcashd"
VALUE "InternalName", "bitzecd"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "zcashd.exe"
VALUE "ProductName", "zcashd"
VALUE "OriginalFilename", "bitzecd.exe"
VALUE "ProductName", "bitzecd"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
@@ -72,7 +72,7 @@ bool AppInit(int argc, char* argv[])
// Process help and version before taking care about datadir
if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
{
std::string strUsage = _("Zcash Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();
std::string strUsage = _("Bitzec Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();

if (mapArgs.count("-version"))
{
@@ -81,13 +81,13 @@ bool AppInit(int argc, char* argv[])
else
{
strUsage += "\n" + _("Usage:") + "\n" +
" zcashd [options] " + _("Start Zcash Daemon") + "\n";
" bitzecd [options] " + _("Start Bitzec Daemon") + "\n";

strUsage += "\n" + HelpMessage(HMM_BITCOIND);
}

fprintf(stdout, "%s", strUsage.c_str());
return true;
return false;
}

try
@@ -102,21 +102,21 @@ bool AppInit(int argc, char* argv[])
ReadConfigFile(mapArgs, mapMultiArgs);
} catch (const missing_zcash_conf& e) {
fprintf(stderr,
(_("Before starting zcashd, you need to create a configuration file:\n"
(_("Before starting bitzecd, you need to create a configuration file:\n"
"%s\n"
"It can be completely empty! That indicates you are happy with the default\n"
"configuration of zcashd. But requiring a configuration file to start ensures\n"
"that zcashd won't accidentally compromise your privacy if there was a default\n"
"configuration of bitzecd. But requiring a configuration file to start ensures\n"
"that bitzecd won't accidentally compromise your privacy if there was a default\n"
"option you needed to change.\n"
"\n"
"You can look at the example configuration file for suggestions of default\n"
"options that you may want to change. It should be in one of these locations,\n"
"depending on how you installed Zcash:\n") +
"depending on how you installed Bitzec:\n") +
_("- Source code: %s\n"
"- .deb package: %s\n")).c_str(),
GetConfigFile().string().c_str(),
"contrib/debian/examples/zcash.conf",
"/usr/share/doc/zcash/examples/zcash.conf");
"contrib/debian/examples/bitzecd.conf",
"/usr/share/doc/bitzec/examples/bitzec.conf");
return false;
} catch (const std::exception& e) {
fprintf(stderr,"Error reading configuration file: %s\n", e.what());
@@ -131,19 +131,19 @@ bool AppInit(int argc, char* argv[])
// Command-line RPC
bool fCommandLine = false;
for (int i = 1; i < argc; i++)
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "zcash:"))
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "bitzec:"))
fCommandLine = true;

if (fCommandLine)
{
fprintf(stderr, "Error: There is no RPC client functionality in zcashd. Use the zcash-cli utility instead.\n");
fprintf(stderr, "Error: There is no RPC client functionality in bitzecd. Use the bitzec-cli utility instead.\n");
exit(EXIT_FAILURE);
}
#ifndef WIN32
fDaemon = GetBoolArg("-daemon", false);
if (fDaemon)
{
fprintf(stdout, "Zcash server starting\n");
fprintf(stdout, "Bitzec server starting\n");

// Daemonize
pid_t pid = fork();
@@ -75,6 +75,39 @@ static CBlock CreateGenesisBlock(uint32_t nTime, const uint256& nNonce, const st
* + Contains no strange transactions
*/


/*
Summary of additional consensus parameters
mainnnet
consensus.fPowNoRetargeting=false;
consensus.nLWMAHeight=400000;
consensus.nPowLwmaTargetSpacing = 1 * 60;
consensus.nZawyLwmaAveragingWindow = 75; //N=75 recommended by Zawy
consensus.nZawyLwmaAdjustedWeight = 13772; // hx43 uses k = (N+1)/2 * 0.998 * T 13772
consensus.nZawyLwmaMinDenominator = 10;
consensus.fZawyLwmaSolvetimeLimitation = true;
testnet
consensus.fPowNoRetargeting=false;
consensus.nLWMAHeight=20000;
consensus.nPowLwmaTargetSpacing = 1 * 60;
consensus.nZawyLwmaAveragingWindow = 75; //N=75 recommended by Zawy
consensus.nZawyLwmaAdjustedWeight = 13772;
consensus.nZawyLwmaMinDenominator = 10;
consensus.fZawyLwmaSolvetimeLimitation = true;
regtest
consensus.fPowNoRetargeting=true
consensus.nLWMAHeight=-1
consensus.nPowLwmaTargetSpacing = 1 * 60;
consensus.nZawyLwmaAveragingWindow = 75; //N=75 recommended by Zawy
consensus.nZawyLwmaAdjustedWeight = 13772;
consensus.nZawyLwmaMinDenominator = 10;
consensus.fZawyLwmaSolvetimeLimitation = true;
*/

const arith_uint256 maxUint = UintToArith256(uint256S("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));

class CMainParams : public CChainParams {
@@ -90,11 +123,11 @@ class CMainParams : public CChainParams {
consensus.nMajorityRejectBlockOutdated = 950;
consensus.nMajorityWindow = 4000;
consensus.powLimit = uint256S("0007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowAveragingWindow = 17;
consensus.nPowAveragingWindow = 13;
assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
consensus.nPowMaxAdjustDown = 32; // 32% adjustment down
consensus.nPowMaxAdjustUp = 16; // 16% adjustment up
consensus.nPowTargetSpacing = 1 * 60;
consensus.nPowTargetSpacing = 2.5 * 60;
consensus.vUpgrades[Consensus::BASE_SPROUT].nProtocolVersion = 170002;
consensus.vUpgrades[Consensus::BASE_SPROUT].nActivationHeight =
Consensus::NetworkUpgrade::ALWAYS_ACTIVE;
@@ -106,8 +139,16 @@ class CMainParams : public CChainParams {
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nProtocolVersion = 170007;
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = 400000;

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000281b32ff3198a1");
consensus.fPowNoRetargeting=false;
consensus.nLWMAHeight=399900;
consensus.nPowLwmaTargetSpacing = 1 * 60;
consensus.nZawyLwmaAveragingWindow = 75;
consensus.nZawyLwmaAdjustedWeight = 2280;
consensus.nZawyLwmaMinDenominator = 10;
consensus.fZawyLwmaSolvetimeLimitation = true;
consensus.ZCnPowTargetSpacing = 2.5 * 60; //legacy spacing.



/**
* The message start string should be awesome! ❤
@@ -119,11 +160,11 @@ class CMainParams : public CChainParams {
vAlertPubKey = ParseHex("04b7ecf0baa90495ceb4e4090f6b2fd37eec1e9c85fac68a487f3ce11589692e4a317479316ee814e066638e1db54e37a10689b70286e6315b1087b6615d179264");
nDefaultPort = 8234;
nPruneAfterHeight = 100000;
newTimeRule = 399300;
newTimeRule = 400000;
eh_epoch_1 = eh200_9;
eh_epoch_2 = eh144_5;
eh_epoch_1_endblock = 400010;
eh_epoch_2_startblock = 400000;
eh_epoch_1_endblock = 400000;
eh_epoch_2_startblock = 400001;

genesis = CreateGenesisBlock(
1477641360,
@@ -283,9 +324,16 @@ class CTestNetParams : public CChainParams {
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nProtocolVersion = 170007;
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = 280000;

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000001d0c4d9cd");
consensus.fPowNoRetargeting=false;
consensus.nLWMAHeight=22440;
consensus.nPowLwmaTargetSpacing = 1 * 60;
consensus.nZawyLwmaAveragingWindow = 75; //N=75 recommended by Zawy
consensus.nZawyLwmaAdjustedWeight = 2280;
consensus.nZawyLwmaMinDenominator = 10;
consensus.fZawyLwmaSolvetimeLimitation = true;
consensus.ZCnPowTargetSpacing = 2.5 * 60;

assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
pchMessageStart[0] = 0xfa;
pchMessageStart[1] = 0x1a;
pchMessageStart[2] = 0xf9;
@@ -340,15 +388,12 @@ class CTestNetParams : public CChainParams {
fMineBlocksOnDemand = false;
fTestnetToBeDeprecatedFieldRPC = true;


checkpointData = (CCheckpointData) {
checkpointData = (Checkpoints::CCheckpointData) {
boost::assign::map_list_of
(0, consensus.hashGenesisBlock)
(38000, uint256S("0x001e9a2d2e2892b88e9998cf7b079b41d59dd085423a921fe8386cecc42287b8")),
1486897419, // * UNIX timestamp of last checkpoint block
47163, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
715 // total number of tx / (checkpoint block height / (24 * 24))
( 0, consensus.hashGenesisBlock),
genesis.nTime,
0,
0
};

// Founders reward script expects a vector of 2-of-3 multisig addresses
@@ -376,7 +421,16 @@ class CRegTestParams : public CChainParams {
consensus.nMajorityRejectBlockOutdated = 950;
consensus.nMajorityWindow = 1000;
consensus.powLimit = uint256S("0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f");
consensus.nPowAveragingWindow = 17;

consensus.fPowNoRetargeting=true;
consensus.nLWMAHeight=-1;
consensus.nPowLwmaTargetSpacing = 1 * 60;
consensus.nZawyLwmaAveragingWindow = 75; //N=75 recommended by Zawy
consensus.nZawyLwmaAdjustedWeight = 2280;
consensus.nZawyLwmaMinDenominator = 10;
consensus.fZawyLwmaSolvetimeLimitation = true;
consensus.ZCnPowTargetSpacing = 2.5 * 60;

assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
consensus.nPowMaxAdjustDown = 0; // Turn off adjustment down
consensus.nPowMaxAdjustUp = 0; // Turn off adjustment up
Oops, something went wrong.

0 comments on commit 9e8eb47

Please sign in to comment.
You can’t perform that action at this time.