diff --git a/.gitignore b/.gitignore index d356fee42c2..b585ef7b5c0 100644 --- a/.gitignore +++ b/.gitignore @@ -164,6 +164,9 @@ src/Makefile.in src/cc/customcc.so src/libcc.so +SPACE_7776 src/SPACE_7776 src/tSPACE_7776 - +src/spacecoind +src/spacecoin-cli +src/spacecoin-tx diff --git a/Makefile.am b/Makefile.am index 51d0430aca4..bdf08bde48d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,8 +13,8 @@ pkgconfig_DATA = libzcashconsensus.pc endif -BITCOIND_BIN=$(top_builddir)/src/komodod$(EXEEXT) -BITCOIN_CLI_BIN=$(top_builddir)/src/komodo-cli$(EXEEXT) +BITCOIND_BIN=$(top_builddir)/src/spacecoind$(EXEEXT) +BITCOIN_CLI_BIN=$(top_builddir)/src/spacecoin-cli$(EXEEXT) #WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT) BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) diff --git a/README.md b/README.md index 38fcccdc69c..6c71a0b3c75 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![discord](https://img.shields.io/discord/701937565929963581)](https://spaceworks.co/discord) --- -![Spacecoin Logo](https://i.imgur.com/jXUcvgy.png "Spacecoin Logo") +![Spacecoin Logo](https://i.imgur.com/FlGoFAz.png "Spacecoin Logo") ## Spacecoin (SPACE) @@ -12,11 +12,11 @@ This is the official Spacecoin source code repository based on [KomodoPlatform/K ## Resources -- Website: [https://spaceworks.co](https://spaceworks.co/) -- Block Explorer: [https://explorer.spaceworks.co](https://explorer.spaceworks.co/) -- Discord: [https://spaceworks.co/discord](https://spaceworks.co/discord) -- Mail: [hello@spaceworks.co](mailto:hello@spaceworks.co) -- Support: [#support channel on discord](https://spaceworks.co/discord) +- Website: [spacecoin.network](https://spacecoin.network/) +- Block Explorer: [spacecoinexplorer.com](https://spacecoinexplorer.com) +- Discord: [spacecoin.network/discord](https://spacecoin.network/discord) +- Mail: [hello@spacecoin.network](mailto:hello@spacecoin.network) +- Support: The `#support` channel on the [Spacecoin Discord](https://spacecoin.network/discord) ## Tech Specification - Max Supply: 5,898,454,281 SPACE diff --git a/configure.ac b/configure.ac index b169ec4c8c5..b4c2c7f6ce0 100644 --- a/configure.ac +++ b/configure.ac @@ -14,9 +14,9 @@ AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) -BITCOIN_DAEMON_NAME=komodod -BITCOIN_CLI_NAME=komodo-cli -BITCOIN_TX_NAME=komodo-tx +BITCOIN_DAEMON_NAME=spacecoind +BITCOIN_CLI_NAME=spacecoin-cli +BITCOIN_TX_NAME=spacecoin-tx dnl Unless the user specified ARFLAGS, force it to be cr AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to if not set]) @@ -236,7 +236,7 @@ CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" AC_ARG_WITH([utils], [AS_HELP_STRING([--with-utils], - [build komodo-cli komodo-tx wallet-utility (default=yes)])], + [build spacecoin-cli spacecoin-tx wallet-utility (default=yes)])], [build_bitcoin_utils=$withval], [build_bitcoin_utils=yes]) @@ -814,7 +814,7 @@ AC_MSG_CHECKING([whether to build bitcoind]) AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes]) AC_MSG_RESULT($build_bitcoind) -AC_MSG_CHECKING([whether to build utils (komodo-cli komodo-tx wallet-utility)]) +AC_MSG_CHECKING([whether to build utils (spacecoin-cli spacecoin-tx wallet-utility)]) AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes]) AC_MSG_RESULT($build_bitcoin_utils) @@ -988,7 +988,7 @@ case $host in ;; esac -echo +echo echo "Options used to compile and link:" echo " with wallet = $enable_wallet" echo " with proton = $use_proton" @@ -996,7 +996,7 @@ echo " with zmq = $use_zmq" echo " with test = $use_tests" echo " debug enabled = $enable_debug" echo " werror = $enable_werror" -echo +echo echo " target os = $TARGET_OS" echo " build os = $BUILD_OS" echo @@ -1007,4 +1007,4 @@ echo " CXX = $CXX" echo " CXXFLAGS = $CXXFLAGS" echo " LDFLAGS = $LDFLAGS" echo " ARFLAGS = $ARFLAGS" -echo +echo diff --git a/src/Makefile.am b/src/Makefile.am index 23cff51cba9..34f97fc107a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -120,11 +120,11 @@ noinst_PROGRAMS = TESTS = #if BUILD_BITCOIND - bin_PROGRAMS += komodod + bin_PROGRAMS += spacecoind #endif if BUILD_BITCOIN_UTILS - bin_PROGRAMS += komodo-cli komodo-tx + bin_PROGRAMS += spacecoin-cli spacecoin-tx endif if ENABLE_WALLET bin_PROGRAMS += wallet-utility @@ -549,16 +549,16 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h # # bitcoind binary # -komodod_SOURCES = bitcoind.cpp -komodod_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -komodod_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -komodod_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) +spacecoind_SOURCES = bitcoind.cpp +spacecoind_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) +spacecoind_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) +spacecoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) if TARGET_WINDOWS -komodod_SOURCES += bitcoind-res.rc +spacecoind_SOURCES += bitcoind-res.rc endif -komodod_LDADD = \ +spacecoind_LDADD = \ $(LIBBITCOIN_SERVER) \ $(LIBBITCOIN_COMMON) \ $(LIBUNIVALUE) \ @@ -576,10 +576,10 @@ komodod_LDADD = \ $(LIBCRYPTOCONDITIONS) if ENABLE_WALLET -komodod_LDADD += $(LIBBITCOIN_WALLET) +spacecoind_LDADD += $(LIBBITCOIN_WALLET) endif -komodod_LDADD += \ +spacecoind_LDADD += \ $(BOOST_LIBS) \ $(BDB_LIBS) \ $(SSL_LIBS) \ @@ -594,31 +594,31 @@ komodod_LDADD += \ $(LIBZCASH_LIBS) if TARGET_DARWIN -komodod_LDADD += libcc.dylib $(LIBSECP256K1) +spacecoind_LDADD += libcc.dylib $(LIBSECP256K1) endif if TARGET_WINDOWS -komodod_LDADD += libcc.dll $(LIBSECP256K1) +spacecoind_LDADD += libcc.dll $(LIBSECP256K1) endif if TARGET_LINUX -komodod_LDADD += libcc.so $(LIBSECP256K1) +spacecoind_LDADD += libcc.so $(LIBSECP256K1) endif if ENABLE_PROTON -komodod_LDADD += $(LIBBITCOIN_PROTON) $(PROTON_LIBS) +spacecoind_LDADD += $(LIBBITCOIN_PROTON) $(PROTON_LIBS) endif # [+] Decker: use static linking for libstdc++.6.dylib, libgomp.1.dylib, libgcc_s.1.dylib if TARGET_DARWIN -komodod_LDFLAGS += -static-libgcc +spacecoind_LDFLAGS += -static-libgcc endif # bitcoin-cli binary # -komodo_cli_SOURCES = bitcoin-cli.cpp -komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) -komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) +spacecoin_cli_SOURCES = bitcoin-cli.cpp +spacecoin_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) +spacecoin_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) +spacecoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) if TARGET_DARWIN -komodo_cli_LDFLAGS += -static-libgcc +spacecoin_cli_LDFLAGS += -static-libgcc endif # wallet-utility binary # @@ -630,10 +630,10 @@ wallet_utility_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) endif if TARGET_WINDOWS -komodo_cli_SOURCES += bitcoin-cli-res.rc +spacecoin_cli_SOURCES += bitcoin-cli-res.rc endif -komodo_cli_LDADD = \ +spacecoin_cli_LDADD = \ $(LIBBITCOIN_CLI) \ $(LIBUNIVALUE) \ $(LIBBITCOIN_UTIL) \ @@ -666,17 +666,17 @@ wallet_utility_LDADD = \ endif # zcash-tx binary # -komodo_tx_SOURCES = komodo-tx.cpp -komodo_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -komodo_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -komodo_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) +spacecoin_tx_SOURCES = komodo-tx.cpp +spacecoin_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) +spacecoin_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) +spacecoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) if TARGET_WINDOWS -komodo_tx_SOURCES += bitcoin-tx-res.rc +spacecoin_tx_SOURCES += bitcoin-tx-res.rc endif # FIXME: Is libzcash needed for zcash_tx? -komodo_tx_LDADD = \ +spacecoin_tx_LDADD = \ $(LIBUNIVALUE) \ $(LIBBITCOIN_COMMON) \ $(LIBBITCOIN_UTIL) \ @@ -689,7 +689,7 @@ komodo_tx_LDADD = \ $(LIBZCASH_LIBS) \ $(LIBCRYPTOCONDITIONS) -komodo_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) +spacecoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) # # zcash protocol primitives # diff --git a/src/Makefile.ktest.include b/src/Makefile.ktest.include index bfbccc196ad..942cd143563 100644 --- a/src/Makefile.ktest.include +++ b/src/Makefile.ktest.include @@ -16,8 +16,8 @@ komodo_test_SOURCES = \ test-komodo/test_addrman.cpp \ test-komodo/test_netbase_tests.cpp -komodo_test_CPPFLAGS = $(komodod_CPPFLAGS) +komodo_test_CPPFLAGS = $(spacecoind_CPPFLAGS) -komodo_test_LDADD = -lgtest $(komodod_LDADD) +komodo_test_LDADD = -lgtest $(spacecoind_LDADD) komodo_test_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 544972586aa..35665cc20f0 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -46,7 +46,7 @@ std::string HelpMessageCli() std::string strUsage; strUsage += HelpMessageGroup(_("Options:")); strUsage += HelpMessageOpt("-?", _("This help message")); - strUsage += HelpMessageOpt("-conf=", strprintf(_("Specify configuration file (default: %s)"), "komodo.conf")); + strUsage += HelpMessageOpt("-conf=", strprintf(_("Specify configuration file (default: %s)"), "SPACE.conf")); strUsage += HelpMessageOpt("-datadir=", _("Specify data directory")); strUsage += HelpMessageOpt("-testnet", _("Use the test network")); strUsage += HelpMessageOpt("-regtest", _("Enter regression test mode, which uses a special chain in which blocks can be " @@ -96,17 +96,17 @@ static int AppInitRPC(int argc, char* argv[]) // ParseParameters(argc, argv); std:string name; - name = GetArg("-ac_name",""); + name = GetArg("-ac_name","SPACE"); if ( !name.empty() ) strncpy(ASSETCHAINS_SYMBOL,name.c_str(),sizeof(ASSETCHAINS_SYMBOL)-1); if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) { - std::string strUsage = _("Komodo RPC client version") + " " + FormatFullVersion() + "\n" + PrivacyInfo(); + std::string strUsage = _("Spacecoin RPC client version") + " " + FormatFullVersion() + "\n" + PrivacyInfo(); if (!mapArgs.count("-version")) { strUsage += "\n" + _("Usage:") + "\n" + - " komodo-cli [options] [params] " + _("Send command to Komodo") + "\n" + - " komodo-cli [options] help " + _("List commands") + "\n" + - " komodo-cli [options] help " + _("Get help for a command") + "\n"; + " spacecoin-cli [options] [params] " + _("Send command to Spacecoin") + "\n" + + " spacecoin-cli [options] help " + _("List commands") + "\n" + + " spacecoin-cli [options] help " + _("Get help for a command") + "\n"; strUsage += "\n" + HelpMessageCli(); } else { diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index ef7b09a37f0..5cc698b2b7a 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -130,7 +130,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 = _("Komodo Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo(); + std::string strUsage = _("Spacecoin Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo(); if (mapArgs.count("-version")) { @@ -139,7 +139,7 @@ bool AppInit(int argc, char* argv[]) else { strUsage += "\n" + _("Usage:") + "\n" + - " komodod [options] " + _("Start Komodo Daemon") + "\n"; + " spacecoind [options] " + _("Start Spacecoin Daemon") + "\n"; strUsage += "\n" + HelpMessage(HMM_BITCOIND); } @@ -172,21 +172,21 @@ bool AppInit(int argc, char* argv[]) ReadConfigFile(mapArgs, mapMultiArgs); } catch (const missing_zcash_conf& e) { fprintf(stderr, - (_("Before starting komodod, you need to create a configuration file:\n" + (_("Before starting spacecoind, 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 komodod. But requiring a configuration file to start ensures\n" - "that komodod won't accidentally compromise your privacy if there was a default\n" + "configuration of spacecoind. But requiring a configuration file to start ensures\n" + "that spacecoind 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 Komodo:\n") + + "depending on how you installed Spacecoin:\n") + _("- Source code: %s\n" "- .deb package: %s\n")).c_str(), GetConfigFile().string().c_str(), - "contrib/debian/examples/komodo.conf", - "/usr/share/doc/komodo/examples/komodo.conf"); + "contrib/debian/examples/SPACE.conf", + "/usr/share/doc/spacecoin/examples/SPACE.conf"); return false; } catch (const std::exception& e) { fprintf(stderr,"Error reading configuration file: %s\n", e.what()); @@ -196,12 +196,12 @@ 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], "komodo:")) + if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "spacecoin:")) fCommandLine = true; if (fCommandLine) { - fprintf(stderr, "Error: There is no RPC client functionality in komodod. Use the komodo-cli utility instead.\n"); + fprintf(stderr, "Error: There is no RPC client functionality in spacecoind. Use the spacecoin-cli utility instead.\n"); exit(EXIT_FAILURE); } @@ -209,7 +209,7 @@ bool AppInit(int argc, char* argv[]) fDaemon = GetBoolArg("-daemon", false); if (fDaemon) { - fprintf(stdout, "Komodo %s server starting\n",ASSETCHAINS_SYMBOL); + fprintf(stdout, "Spacecoin %s server starting\n",ASSETCHAINS_SYMBOL); // Daemonize pid_t pid = fork(); diff --git a/src/komodo_utils.h b/src/komodo_utils.h index feed2a4ee1f..acdb07d1e44 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1748,6 +1748,22 @@ void komodo_args(char *argv0) fprintf(stderr, "Cannot be STAKED and KMD notary at the same time!\n"); StartShutdown(); } + + // Spacecoin (SPACE) parameters (start SPACE by default) + + SoftSetArg("-ac_name", std::string("SPACE")); + SoftSetArg("-ac_supply", std::string("0")); + SoftSetArg("-ac_eras", std::string("6")); + SoftSetArg("-ac_reward", std::string("3600000000,2700000000,1800000000,900000000,600000000,300000000")); + SoftSetArg("-ac_end", std::string("939393,3757572,12212109,325343422,638474735,951606048")); + SoftSetArg("-ac_blocktime", std::string("30")); + SoftSetArg("-ac_staked", std::string("50")); + SoftSetArg("-ac_cbmaturity", std::string("1")); + SoftSetArg("-ac_cc", std::string("939")); + SoftSetArg("-ac_sapling", std::string("1")); + vector SPACEnodes = { "165.227.35.158", "167.172.39.135", "165.22.64.156", "188.166.221.247", "164.90.145.140", "188.40.53.201", "94.130.38.173" }; + mapMultiArgs["-addnode"] = SPACEnodes; + name = GetArg("-ac_name",""); if ( argv0 != 0 ) { @@ -2494,7 +2510,7 @@ void komodo_prefetch(FILE *fp) } // check if block timestamp is more than S5 activation time -// this function is to activate the ExtractDestination fix +// this function is to activate the ExtractDestination fix bool komodo_is_vSolutionsFixActive() { return GetLatestTimestamp(komodo_currentheight()) > nS5Timestamp; diff --git a/src/spacecoin-cli b/src/spacecoin-cli deleted file mode 100755 index 8e2bce8a4a8..00000000000 --- a/src/spacecoin-cli +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2020 SpaceWorks developers - -# set working directory to the location of this script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $DIR - -NAME=SPACE - -CLI=${KOMODOCLI:-./komodo-cli} -$CLI -ac_name=$NAME "$@" diff --git a/src/spacecoind b/src/spacecoind deleted file mode 100755 index a559f257e47..00000000000 --- a/src/spacecoind +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2020 SpaceWorks developers - -# set working directory to the location of this script -DIR="$( cd "$( dirname "$( readlink -f "${BASH_SOURCE[0]}" )" )" && pwd )" -cd $DIR - -NAME=SPACE - -# Chain parameters -ERAS=6 -BLOCKTIME=30 -SUPPLY=0 -REWARD=3600000000,2700000000,1800000000,900000000,600000000,300000000 -END=939393,3757572,12212109,325343422,638474735,951606048 -ADDNODE1=165.227.35.158 -ADDNODE2=167.172.39.135 -ADDNODE3=165.22.64.156 -ADDNODE4=188.166.221.247 - -KMD=${KOMODOD:-./komodod} -$KMD -ac_name=$NAME \ - -ac_supply=$SUPPLY \ - -ac_eras=$ERAS \ - -ac_reward=$REWARD \ - -ac_end=$END \ - -ac_blocktime=$BLOCKTIME \ - -ac_staked=50 \ - -ac_cbmaturity=1 \ - -ac_cc=939 \ - -ac_sapling=1 \ - -addnode=$ADDNODE1 \ - -addnode=$ADDNODE2 \ - -addnode=$ADDNODE3 \ - -addnode=$ADDNODE4 "$@" diff --git a/zcutil/build-win.sh b/zcutil/build-win.sh index e8c0465d98b..1a501f883d0 100755 --- a/zcutil/build-win.sh +++ b/zcutil/build-win.sh @@ -21,4 +21,4 @@ cd $WD CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site CXXFLAGS="-DPTW32_STATIC_LIB -DCURL_STATICLIB -DCURVE_ALT_BN128 -fopenmp -pthread" ./configure --prefix="${PREFIX}" --host=x86_64-w64-mingw32 --enable-static --disable-shared sed -i 's/-lboost_system-mt /-lboost_system-mt-s /' configure cd src/ -CC="${CC} -g " CXX="${CXX} -g " make V=1 komodod.exe komodo-cli.exe komodo-tx.exe +CC="${CC} -g " CXX="${CXX} -g " make V=1 spacecoind.exe spacecoin-cli.exe spacecoin-tx.exe