Skip to content

Commit

Permalink
Merge pull request #30 from DeckerSU/static-dev
Browse files Browse the repository at this point in the history
v0.7.1: static-dev -> static
  • Loading branch information
DeckerSU authored Sep 22, 2021
2 parents 163d66c + 4000467 commit d8dbd47
Show file tree
Hide file tree
Showing 102 changed files with 15,012 additions and 14,313 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 7)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
10 changes: 5 additions & 5 deletions share/nsi_win64/install-new.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ DetailPrint "Checking: sprout-proving.key"
IfFileExists "$APPDATA\ZcashParams\sprout-proving.key" next_1
DetailPrint "Downloading: sprout-proving.key"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-proving.key" \
"https://komodoplatform.com/downloads/sprout-proving.key" "$APPDATA\ZcashParams\sprout-proving.key" \
"https://z.cash/downloads/sprout-proving.key.deprecated-sworn-elves" "$APPDATA\ZcashParams\sprout-proving.key" \
/END
Pop $0
StrCmp $0 "OK" next_1
Expand All @@ -45,7 +45,7 @@ DetailPrint "Checking: sprout-verifying.key"
IfFileExists "$APPDATA\ZcashParams\sprout-verifying.key" next_2
DetailPrint "Downloading: sprout-verifying.key"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-verifying.key" \
"https://komodoplatform.com/downloads/sprout-verifying.key" "$APPDATA\ZcashParams\sprout-verifying.key" \
"https://z.cash/downloads/sprout-verifying.key" "$APPDATA\ZcashParams\sprout-verifying.key" \
/END
Pop $0
StrCmp $0 "OK" next_2
Expand All @@ -57,7 +57,7 @@ DetailPrint "Checking: sapling-spend.params"
IfFileExists "$APPDATA\ZcashParams\sapling-spend.params" next_3
DetailPrint "Downloading: sapling-spend.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sapling-spend.params" \
"https://komodoplatform.com/downloads/sapling-spend.params" "$APPDATA\ZcashParams\sapling-spend.params" \
"https://z.cash/downloads/sapling-spend.params" "$APPDATA\ZcashParams\sapling-spend.params" \
/END
Pop $0
StrCmp $0 "OK" next_3
Expand All @@ -69,7 +69,7 @@ DetailPrint "Checking: sapling-output.params"
IfFileExists "$APPDATA\ZcashParams\sapling-output.params" next_4
DetailPrint "Downloading: sapling-output.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sapling-output.params" \
"https://komodoplatform.com/downloads/sapling-output.params" "$APPDATA\ZcashParams\sapling-output.params" \
"https://z.cash/downloads/sapling-output.params" "$APPDATA\ZcashParams\sapling-output.params" \
/END
Pop $0
StrCmp $0 "OK" next_4
Expand All @@ -81,7 +81,7 @@ DetailPrint "Checking: sprout-groth16.params"
IfFileExists "$APPDATA\ZcashParams\sprout-groth16.params" next_5
DetailPrint "Downloading: sprout-groth16.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-groth16.params" \
"https://komodoplatform.com/downloads/sprout-groth16.params" "$APPDATA\ZcashParams\sprout-groth16.params" \
"https://z.cash/downloads/sprout-groth16.params" "$APPDATA\ZcashParams\sprout-groth16.params" \
/END
Pop $0
StrCmp $0 "OK" next_5
Expand Down
16 changes: 10 additions & 6 deletions share/nsi_win64/install.nsi
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
Target x86-unicode
; SetCompressor lzma
; SetCompressor /SOLID zlib

RequestExecutionLevel highest
SetCompressor /SOLID lzma

; Settings
Name "KomodoOcean (Komodo-Qt)"
OutFile "komodo-qt-install.exe"
RequestExecutionLevel admin
; RequestExecutionLevel admin
InstallDir "$PROGRAMFILES64\KomodoOcean"
Icon "komodo.ico"
CRCCheck on
Expand Down Expand Up @@ -32,7 +36,7 @@ DetailPrint "Checking: sprout-proving.key"
IfFileExists "$APPDATA\ZcashParams\sprout-proving.key" next_1
DetailPrint "Downloading: sprout-proving.key"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-proving.key" \
"https://komodoplatform.com/downloads/sprout-proving.key" "$APPDATA\ZcashParams\sprout-proving.key" \
"https://z.cash/downloads/sprout-proving.key.deprecated-sworn-elves" "$APPDATA\ZcashParams\sprout-proving.key" \
/END
Pop $0
StrCmp $0 "OK" next_1
Expand All @@ -44,7 +48,7 @@ DetailPrint "Checking: sprout-verifying.key"
IfFileExists "$APPDATA\ZcashParams\sprout-verifying.key" next_2
DetailPrint "Downloading: sprout-verifying.key"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-verifying.key" \
"https://komodoplatform.com/downloads/sprout-verifying.key" "$APPDATA\ZcashParams\sprout-verifying.key" \
"https://z.cash/downloads/sprout-verifying.key" "$APPDATA\ZcashParams\sprout-verifying.key" \
/END
Pop $0
StrCmp $0 "OK" next_2
Expand All @@ -56,7 +60,7 @@ DetailPrint "Checking: sapling-spend.params"
IfFileExists "$APPDATA\ZcashParams\sapling-spend.params" next_3
DetailPrint "Downloading: sapling-spend.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sapling-spend.params" \
"https://komodoplatform.com/downloads/sapling-spend.params" "$APPDATA\ZcashParams\sapling-spend.params" \
"https://z.cash/downloads/sapling-spend.params" "$APPDATA\ZcashParams\sapling-spend.params" \
/END
Pop $0
StrCmp $0 "OK" next_3
Expand All @@ -68,7 +72,7 @@ DetailPrint "Checking: sapling-output.params"
IfFileExists "$APPDATA\ZcashParams\sapling-output.params" next_4
DetailPrint "Downloading: sapling-output.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sapling-output.params" \
"https://komodoplatform.com/downloads/sapling-output.params" "$APPDATA\ZcashParams\sapling-output.params" \
"https://z.cash/downloads/sapling-output.params" "$APPDATA\ZcashParams\sapling-output.params" \
/END
Pop $0
StrCmp $0 "OK" next_4
Expand All @@ -80,7 +84,7 @@ DetailPrint "Checking: sprout-groth16.params"
IfFileExists "$APPDATA\ZcashParams\sprout-groth16.params" next_5
DetailPrint "Downloading: sprout-groth16.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-groth16.params" \
"https://komodoplatform.com/downloads/sprout-groth16.params" "$APPDATA\ZcashParams\sprout-groth16.params" \
"https://z.cash/downloads/sprout-groth16.params" "$APPDATA\ZcashParams\sprout-groth16.params" \
/END
Pop $0
StrCmp $0 "OK" next_5
Expand Down
36 changes: 33 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ $(LIBUNIVALUE): $(wildcard univalue/lib/*)
$(LIBCRYPTOCONDITIONS): $(wildcard cryptoconditions/src/*) $(wildcard cryptoconditions/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)

# %.o: %.c
# $(CC) -c -o $@ $<

# $(LIBCJSON): cJSON.o komodo_cJSON.o
# $(AR) cr $(LIBCJSON) $^

# libcjson build
LIBCJSON=libcjson.a
libcjson_a_SOURCES = cJSON.c \
komodo_cJSON.c
libcjson_a_CPPFLAGS=-fPIC
EXTRA_LIBRARIES += $(LIBCJSON)

# Make is not made aware of per-object dependencies to avoid limiting building parallelization
# But to build the less dependent modules first, we manually select their order here:
EXTRA_LIBRARIES += \
Expand Down Expand Up @@ -261,6 +274,7 @@ libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
# server: built-in cclib with custom cclib
libbitcoin_server_a_CPPFLAGS += -DBUILD_CUSTOMCC
libbitcoin_server_a_CPPFLAGS += -fPIC

libbitcoin_server_a_SOURCES = \
sendalert.cpp \
Expand Down Expand Up @@ -289,7 +303,6 @@ libbitcoin_server_a_SOURCES = \
cc/oracles.cpp \
cc/prices.cpp \
cc/pegs.cpp \
cc/marmara.cpp \
cc/payments.cpp \
cc/gateways.cpp \
cc/channels.cpp \
Expand Down Expand Up @@ -336,6 +349,7 @@ libbitcoin_server_a_SOURCES = \
txdb.cpp \
txmempool.cpp \
validationinterface.cpp \
mini-gmp.c \
cc/cclib.cpp \
$(BITCOIN_CORE_H) \
$(LIBZCASH_H)
Expand Down Expand Up @@ -454,7 +468,7 @@ crypto_libverus_portable_crypto_a_SOURCES = \
crypto/haraka_portable.c

# common: shared between zcashd and non-server tools
libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_common_a_CPPFLAGS = -fPIC $(BITCOIN_INCLUDES)
libbitcoin_common_a_SOURCES = \
amount.cpp \
arith_uint256.cpp \
Expand All @@ -472,10 +486,25 @@ libbitcoin_common_a_SOURCES = \
crypto/verus_hash.h \
crypto/verus_hash.cpp \
hash.cpp \
hex.c \
importcoin.cpp \
key.cpp \
key_io.cpp \
keystore.cpp \
komodo_structs.cpp \
komodo.cpp \
komodo_bitcoind.cpp \
komodo_ccdata.cpp \
komodo_curve25519.cpp \
komodo_events.cpp \
komodo_gateway.cpp \
komodo_globals.cpp \
komodo_interest.cpp \
komodo_jumblr.cpp \
komodo_kv.cpp \
komodo_notary.cpp \
komodo_pax.cpp \
komodo_utils.cpp \
netbase.cpp \
metrics.cpp \
primitives/block.cpp \
Expand Down Expand Up @@ -570,6 +599,7 @@ komodod_LDADD += $(LIBBITCOIN_WALLET)
endif

komodod_LDADD += \
$(LIBCJSON) \
$(BOOST_LIBS) \
$(BDB_LIBS) \
$(SSL_LIBS) \
Expand Down Expand Up @@ -722,7 +752,7 @@ endif
#

CLEANFILES = $(LIBBITCOIN_COMMON) $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_WALLET) $(LIBBITCOIN_ZMQ) $(LIBZCASH)
CLEANFILES += $(LIBBITCOIN_CRYPTO) $(LIBVERUS_CRYPTO) $(LIBVERUS_PORTABLE_CRYPTO)
CLEANFILES += $(LIBBITCOIN_CRYPTO) $(LIBVERUS_CRYPTO) $(LIBVERUS_PORTABLE_CRYPTO) $(LIBCJSON)
CLEANFILES += *.gcda *.gcno */*.gcno wallet/*/*.gcno
DISTCLEANFILES = obj/build.h

Expand Down
4 changes: 3 additions & 1 deletion src/Makefile.ktest.include
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ komodo_test_SOURCES = \
test-komodo/test_multisig_tests.cpp \
test-komodo/test_merkle_tests.cpp \
test-komodo/test_addrman.cpp \
test-komodo/test_netbase_tests.cpp
test-komodo/test_netbase_tests.cpp \
test-komodo/test_events.cpp \
test-komodo/test_hex.cpp

komodo_test_CPPFLAGS = $(komodod_CPPFLAGS)

Expand Down
4 changes: 3 additions & 1 deletion src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ $(info $$EXTRA_LIBRARIES is [${EXTRA_LIBRARIES}])
qt_komodo_qt_LDADD += libbitcoin_wallet.a
endif

qt_komodo_qt_LDADD += $(LIBBITCOIN_CLI) \
qt_komodo_qt_LDADD += \
$(LIBCJSON) \
$(LIBBITCOIN_CLI) \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CONSENSUS) \
Expand Down
3 changes: 2 additions & 1 deletion src/bitcoind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ void WaitForShutdown(boost::thread_group* threadGroup)
//
// Start
//
extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY;
extern bool IS_KOMODO_NOTARY;
extern int32_t USE_EXTERNAL_PUBKEY;
extern uint32_t ASSETCHAIN_INIT;
extern std::string NOTARY_PUBKEY;
int32_t komodo_is_issuer();
Expand Down
14 changes: 14 additions & 0 deletions src/bits256.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once
#include "stdint.h"

union _bits128 { uint8_t bytes[16]; uint16_t ushorts[8]; uint32_t uints[4]; uint64_t ulongs[2]; uint64_t txid; };
typedef union _bits128 bits128;

union _bits256 { uint8_t bytes[32]; uint16_t ushorts[16]; uint32_t uints[8]; uint64_t ulongs[4]; uint64_t txid; };
typedef union _bits256 bits256;

union _bits320 { uint8_t bytes[40]; uint16_t ushorts[20]; uint32_t uints[10]; uint64_t ulongs[5]; uint64_t txid; };
typedef union _bits320 bits320;

union _bits384 { bits256 sig; uint8_t bytes[48]; uint16_t ushorts[24]; uint32_t uints[12]; uint64_t ulongs[6]; uint64_t txid; };
typedef union _bits384 bits384;
4 changes: 2 additions & 2 deletions src/cJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
#include "cJSON.h"

/* define our own boolean type */
//#define true ((cJSON_bool)1)
//#define false ((cJSON_bool)0)
#define true ((cJSON_bool)1)
#define false ((cJSON_bool)0)

typedef struct {
const unsigned char *json;
Expand Down
47 changes: 0 additions & 47 deletions src/cc/CCMarmara.h

This file was deleted.

22 changes: 1 addition & 21 deletions src/cc/CCcustom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/

#include "hex.h"
#include "key_io.h"
#include "CCinclude.h"
#include "CCassets.h"
Expand All @@ -27,7 +27,6 @@
#include "CCOracles.h"
#include "CCPrices.h"
#include "CCPegs.h"
#include "CCMarmara.h"
#include "CCPayments.h"
#include "CCGateways.h"
#include "CCtokens.h"
Expand Down Expand Up @@ -191,17 +190,6 @@ uint8_t PegsCCpriv[32] = { 0x52, 0x56, 0x4c, 0x78, 0x87, 0xf7, 0xa2, 0x39, 0xb0,
#undef FUNCNAME
#undef EVALCODE

// Marmara
#define FUNCNAME IsMarmaraInput
#define EVALCODE EVAL_MARMARA
const char *MarmaraCCaddr = "RGLSRDnUqTB43bYtRtNVgmwSSd1sun2te8";
const char *MarmaraNormaladdr = "RMN25Tn8NNzcyQDiQNuMp8UmwLMFd9thYc";
char MarmaraCChexstr[67] = { "03afc5be570d0ff419425cfcc580cc762ab82baad88c148f5b028d7db7bfeee61d" };
uint8_t MarmaraCCpriv[32] = { 0x7c, 0x0b, 0x54, 0x9b, 0x65, 0xd4, 0x89, 0x57, 0xdf, 0x05, 0xfe, 0xa2, 0x62, 0x41, 0xa9, 0x09, 0x0f, 0x2a, 0x6b, 0x11, 0x2c, 0xbe, 0xbd, 0x06, 0x31, 0x8d, 0xc0, 0xb9, 0x96, 0x76, 0x3f, 0x24 };
#include "CCcustom.inc"
#undef FUNCNAME
#undef EVALCODE

// Payments
#define FUNCNAME IsPaymentsInput
#define EVALCODE EVAL_PAYMENTS
Expand Down Expand Up @@ -404,14 +392,6 @@ struct CCcontract_info *CCinit(struct CCcontract_info *cp, uint8_t evalcode)
cp->validate = PegsValidate;
cp->ismyvin = IsPegsInput;
break;
case EVAL_MARMARA:
strcpy(cp->unspendableCCaddr,MarmaraCCaddr);
strcpy(cp->normaladdr,MarmaraNormaladdr);
strcpy(cp->CChexstr,MarmaraCChexstr);
memcpy(cp->CCpriv,MarmaraCCpriv,32);
cp->validate = MarmaraValidate;
cp->ismyvin = IsMarmaraInput;
break;
case EVAL_PAYMENTS:
strcpy(cp->unspendableCCaddr,PaymentsCCaddr);
strcpy(cp->normaladdr,PaymentsNormaladdr);
Expand Down
14 changes: 0 additions & 14 deletions src/cc/CCinclude.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ Details.
#define CCDISABLEALL memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES))
#define CCENABLE(x) ASSETCHAINS_CCDISABLES[((uint8_t)x)] = 0

/* moved to komodo_cJSON.h
#ifndef _BITS256
#define _BITS256
union _bits256 { uint8_t bytes[32]; uint16_t ushorts[16]; uint32_t uints[8]; uint64_t ulongs[4]; uint64_t txid; };
typedef union _bits256 bits256;
#endif
*/
/// \endcond

/// identifiers of additional data blobs in token opreturn script:
Expand Down Expand Up @@ -285,13 +278,6 @@ bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlo
/// @param[out] currentheight current chain height
bool NSPV_myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock, int32_t &txheight, int32_t &currentheight);

/// decodes char array in hex encoding to byte array
int32_t decode_hex(uint8_t *bytes, int32_t n, char *hex);

/// checks if char string has hex symbols
/// @returns no zero if string has only hex symbols
int32_t is_hexstr(char *str,int32_t n);

/// CCgettxout returns the amount of an utxo. The function does this without loading the utxo transaction from the chain, by using coin cache
/// @param txid transaction id of the utxo
/// @param vout utxo transaction vout order number
Expand Down
Loading

0 comments on commit d8dbd47

Please sign in to comment.