OSX/WIN port conditions
This commit is contained in:
@@ -1,17 +1,20 @@
|
|||||||
|
ifeq ($(build_os),darwin)
|
||||||
|
package=libsodium
|
||||||
|
$(package)_version=1.0.11
|
||||||
|
$(package)_download_path=https://supernetorg.bintray.com/misc
|
||||||
|
$(package)_file_name=libsodium-1.0.11.tar.gz
|
||||||
|
$(package)_sha256_hash=a14549db3c49f6ae2170cbbf4664bd48ace50681045e8dbea7c8d9fb96f9c765
|
||||||
|
$(package)_dependencies=
|
||||||
|
$(package)_config_opts=
|
||||||
|
else
|
||||||
package=libsodium
|
package=libsodium
|
||||||
#<<<<<<< HEAD
|
|
||||||
#$(package)_version=1.0.11
|
|
||||||
#$(package)_download_path=https://supernetorg.bintray.com/misc
|
|
||||||
#$(package)_file_name=libsodium-1.0.11.tar.gz
|
|
||||||
#$(package)_sha256_hash=a14549db3c49f6ae2170cbbf4664bd48ace50681045e8dbea7c8d9fb96f9c765
|
|
||||||
#=======
|
|
||||||
$(package)_version=1.0.15
|
$(package)_version=1.0.15
|
||||||
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
|
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
|
||||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=fb6a9e879a2f674592e4328c5d9f79f082405ee4bb05cb6e679b90afe9e178f4
|
$(package)_sha256_hash=fb6a9e879a2f674592e4328c5d9f79f082405ee4bb05cb6e679b90afe9e178f4
|
||||||
#>>>>>>> zcash/master
|
|
||||||
$(package)_dependencies=
|
$(package)_dependencies=
|
||||||
$(package)_config_opts=
|
$(package)_config_opts=
|
||||||
|
endif
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
cd $($(package)_build_subdir); ./autogen.sh
|
cd $($(package)_build_subdir); ./autogen.sh
|
||||||
|
|||||||
@@ -13,7 +13,12 @@
|
|||||||
#include "src/eval.c"
|
#include "src/eval.c"
|
||||||
#include "src/json_rpc.c"
|
#include "src/json_rpc.c"
|
||||||
#include <cJSON.h>
|
#include <cJSON.h>
|
||||||
#include <malloc.h>
|
|
||||||
|
#ifdef __LP64__
|
||||||
|
#include <stdlib.h>
|
||||||
|
#else
|
||||||
|
#include <malloc.h> // Index into CTransaction.vjoinsplit
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct CCType *CCTypeRegistry[] = {
|
struct CCType *CCTypeRegistry[] = {
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
#include "cryptoconditions.h"
|
#include "cryptoconditions.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include <cJSON.h>
|
#include <cJSON.h>
|
||||||
#include <malloc.h>
|
|
||||||
|
|
||||||
|
#ifdef __LP64__
|
||||||
|
#include <stdlib.h>
|
||||||
|
#else
|
||||||
|
#include <malloc.h> // Index into CTransaction.vjoinsplit
|
||||||
|
#endif
|
||||||
|
|
||||||
static cJSON *jsonCondition(CC *cond) {
|
static cJSON *jsonCondition(CC *cond) {
|
||||||
cJSON *root = cJSON_CreateObject();
|
cJSON *root = cJSON_CreateObject();
|
||||||
|
|||||||
@@ -73,7 +73,11 @@ struct PaymentDisclosurePayload {
|
|||||||
uint8_t version; // 0 = experimental, 1 = first production version, etc.
|
uint8_t version; // 0 = experimental, 1 = first production version, etc.
|
||||||
uint256 esk; // zcash/NoteEncryption.cpp
|
uint256 esk; // zcash/NoteEncryption.cpp
|
||||||
uint256 txid; // primitives/transaction.h
|
uint256 txid; // primitives/transaction.h
|
||||||
|
#ifdef __LP64__
|
||||||
|
uint64_t js;
|
||||||
|
#else
|
||||||
size_t js; // Index into CTransaction.vjoinsplit
|
size_t js; // Index into CTransaction.vjoinsplit
|
||||||
|
#endif
|
||||||
uint8_t n; // Index into JSDescription fields of length ZC_NUM_JS_OUTPUTS
|
uint8_t n; // Index into JSDescription fields of length ZC_NUM_JS_OUTPUTS
|
||||||
libzcash::PaymentAddress zaddr; // zcash/Address.hpp
|
libzcash::PaymentAddress zaddr; // zcash/Address.hpp
|
||||||
std::string message; // parameter to RPC call
|
std::string message; // parameter to RPC call
|
||||||
|
|||||||
@@ -753,8 +753,14 @@ UniValue AsyncRPCOperation_mergetoaddress::perform_joinsplit(
|
|||||||
// Generate the proof, this can take over a minute.
|
// Generate the proof, this can take over a minute.
|
||||||
boost::array<libzcash::JSInput, ZC_NUM_JS_INPUTS> inputs{info.vjsin[0], info.vjsin[1]};
|
boost::array<libzcash::JSInput, ZC_NUM_JS_INPUTS> inputs{info.vjsin[0], info.vjsin[1]};
|
||||||
boost::array<libzcash::JSOutput, ZC_NUM_JS_OUTPUTS> outputs{info.vjsout[0], info.vjsout[1]};
|
boost::array<libzcash::JSOutput, ZC_NUM_JS_OUTPUTS> outputs{info.vjsout[0], info.vjsout[1]};
|
||||||
|
#ifdef __LP64__
|
||||||
|
boost::array<uint64_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||||
|
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||||
|
#else
|
||||||
boost::array<size_t, ZC_NUM_JS_INPUTS> inputMap;
|
boost::array<size_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
boost::array<size_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
uint256 esk; // payment disclosure - secret
|
uint256 esk; // payment disclosure - secret
|
||||||
|
|
||||||
|
|||||||
@@ -344,8 +344,14 @@ UniValue AsyncRPCOperation_shieldcoinbase::perform_joinsplit(ShieldCoinbaseJSInf
|
|||||||
{info.vjsin[0], info.vjsin[1]};
|
{info.vjsin[0], info.vjsin[1]};
|
||||||
boost::array<libzcash::JSOutput, ZC_NUM_JS_OUTPUTS> outputs
|
boost::array<libzcash::JSOutput, ZC_NUM_JS_OUTPUTS> outputs
|
||||||
{info.vjsout[0], info.vjsout[1]};
|
{info.vjsout[0], info.vjsout[1]};
|
||||||
|
|
||||||
|
#ifdef __LP64__
|
||||||
|
boost::array<uint64_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||||
|
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||||
|
#else
|
||||||
boost::array<size_t, ZC_NUM_JS_INPUTS> inputMap;
|
boost::array<size_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
boost::array<size_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||||
|
#endif
|
||||||
|
|
||||||
uint256 esk; // payment disclosure - secret
|
uint256 esk; // payment disclosure - secret
|
||||||
|
|
||||||
|
|||||||
@@ -3828,7 +3828,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
|||||||
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), nextBlockHeight);
|
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), nextBlockHeight);
|
||||||
bool isShielded = !fromTaddr || zaddrRecipients.size() > 0;
|
bool isShielded = !fromTaddr || zaddrRecipients.size() > 0;
|
||||||
if (contextualTx.nVersion == 1 && isShielded) {
|
if (contextualTx.nVersion == 1 && isShielded) {
|
||||||
contextualTx.nVersion = 2; // Tx format should support vjoinsplits
|
contextualTx.nVersion = 2; // Tx format should support vjoinsplits
|
||||||
}
|
}
|
||||||
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||||
contextualTx.nExpiryHeight = nextBlockHeight + expiryDelta;
|
contextualTx.nExpiryHeight = nextBlockHeight + expiryDelta;
|
||||||
@@ -3938,7 +3938,13 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp)
|
|||||||
CAmount shieldedValue = 0;
|
CAmount shieldedValue = 0;
|
||||||
CAmount remainingValue = 0;
|
CAmount remainingValue = 0;
|
||||||
size_t estimatedTxSize = 2000; // 1802 joinsplit description + tx overhead + wiggle room
|
size_t estimatedTxSize = 2000; // 1802 joinsplit description + tx overhead + wiggle room
|
||||||
|
|
||||||
|
#ifdef __LP64__
|
||||||
|
uint64_t utxoCounter = 0;
|
||||||
|
#else
|
||||||
size_t utxoCounter = 0;
|
size_t utxoCounter = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool maxedOutFlag = false;
|
bool maxedOutFlag = false;
|
||||||
size_t mempoolLimit = (nLimit != 0) ? nLimit : (size_t)GetArg("-mempooltxinputlimit", 0);
|
size_t mempoolLimit = (nLimit != 0) ? nLimit : (size_t)GetArg("-mempooltxinputlimit", 0);
|
||||||
|
|
||||||
@@ -3994,7 +4000,11 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __LP64__
|
||||||
|
uint64_t numUtxos = inputs.size();
|
||||||
|
#else
|
||||||
size_t numUtxos = inputs.size();
|
size_t numUtxos = inputs.size();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (numUtxos == 0) {
|
if (numUtxos == 0) {
|
||||||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Could not find any coinbase funds to shield.");
|
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Could not find any coinbase funds to shield.");
|
||||||
@@ -4023,7 +4033,7 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp)
|
|||||||
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(
|
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(
|
||||||
Params().GetConsensus(), nextBlockHeight);
|
Params().GetConsensus(), nextBlockHeight);
|
||||||
if (contextualTx.nVersion == 1) {
|
if (contextualTx.nVersion == 1) {
|
||||||
contextualTx.nVersion = 2; // Tx format should support vjoinsplits
|
contextualTx.nVersion = 2; // Tx format should support vjoinsplits
|
||||||
}
|
}
|
||||||
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||||
contextualTx.nExpiryHeight = nextBlockHeight + expiryDelta;
|
contextualTx.nExpiryHeight = nextBlockHeight + expiryDelta;
|
||||||
@@ -4231,8 +4241,13 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp)
|
|||||||
CAmount mergedNoteValue = 0;
|
CAmount mergedNoteValue = 0;
|
||||||
CAmount remainingUTXOValue = 0;
|
CAmount remainingUTXOValue = 0;
|
||||||
CAmount remainingNoteValue = 0;
|
CAmount remainingNoteValue = 0;
|
||||||
|
#ifdef __LP64__
|
||||||
|
uint64_t utxoCounter = 0;
|
||||||
|
uint64_t noteCounter = 0;
|
||||||
|
#else
|
||||||
size_t utxoCounter = 0;
|
size_t utxoCounter = 0;
|
||||||
size_t noteCounter = 0;
|
size_t noteCounter = 0;
|
||||||
|
#endif
|
||||||
bool maxedOutUTXOsFlag = false;
|
bool maxedOutUTXOsFlag = false;
|
||||||
bool maxedOutNotesFlag = false;
|
bool maxedOutNotesFlag = false;
|
||||||
size_t mempoolLimit = (nUTXOLimit != 0) ? nUTXOLimit : (size_t)GetArg("-mempooltxinputlimit", 0);
|
size_t mempoolLimit = (nUTXOLimit != 0) ? nUTXOLimit : (size_t)GetArg("-mempooltxinputlimit", 0);
|
||||||
@@ -4319,8 +4334,14 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __LP64__
|
||||||
|
uint64_t numUtxos = utxoInputs.size(); //ca333
|
||||||
|
uint64_t numNotes = noteInputs.size();
|
||||||
|
#else
|
||||||
size_t numUtxos = utxoInputs.size();
|
size_t numUtxos = utxoInputs.size();
|
||||||
size_t numNotes = noteInputs.size();
|
size_t numNotes = noteInputs.size();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (numUtxos == 0 && numNotes == 0) {
|
if (numUtxos == 0 && numNotes == 0) {
|
||||||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Could not find any funds to merge.");
|
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Could not find any funds to merge.");
|
||||||
@@ -4494,7 +4515,9 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
|
|||||||
if ( eligible > 0 )
|
if ( eligible > 0 )
|
||||||
{
|
{
|
||||||
if ( eligible != komodo_stake(1,bnTarget,(uint32_t)tipindex->nHeight+1,out.tx->GetHash(),out.i,eligible,(uint32_t)tipindex->nTime,(char *)CBitcoinAddress(address).ToString().c_str()) )
|
if ( eligible != komodo_stake(1,bnTarget,(uint32_t)tipindex->nHeight+1,out.tx->GetHash(),out.i,eligible,(uint32_t)tipindex->nTime,(char *)CBitcoinAddress(address).ToString().c_str()) )
|
||||||
fprintf(stderr,"validation of winning blocktime failed %u -> eligible.%u\n",*blocktimep,eligible);
|
{
|
||||||
|
//fprintf(stderr,"tip.%d validation of winning blocktime failed %u -> eligible.%u\n",(uint32_t)tipindex->nHeight,*blocktimep,eligible);
|
||||||
|
}
|
||||||
else if ( earliest == 0 || eligible < earliest || (eligible == earliest && (*utxovaluep == 0 || nValue < *utxovaluep)) )
|
else if ( earliest == 0 || eligible < earliest || (eligible == earliest && (*utxovaluep == 0 || nValue < *utxovaluep)) )
|
||||||
{
|
{
|
||||||
earliest = eligible;
|
earliest = eligible;
|
||||||
@@ -4535,10 +4558,9 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
|
|||||||
for (i=0; i<siglen; i++)
|
for (i=0; i<siglen; i++)
|
||||||
utxosig[i] = ptr[i];//, fprintf(stderr,"%02x",ptr[i]);
|
utxosig[i] = ptr[i];//, fprintf(stderr,"%02x",ptr[i]);
|
||||||
//fprintf(stderr," siglen.%d\n",siglen);
|
//fprintf(stderr," siglen.%d\n",siglen);
|
||||||
fprintf(stderr,"best %u from %u, gap %d\n",earliest,*blocktimep,(int32_t)(earliest - *blocktimep));
|
fprintf(stderr,"best %u from %u, gap %d lag.%d\n",earliest,*blocktimep,(int32_t)(earliest - *blocktimep),(int32_t)(time(NULL) - *blocktimep));
|
||||||
*blocktimep = earliest;
|
*blocktimep = earliest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(siglen);
|
return(siglen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ fi
|
|||||||
TRIPLET=`./depends/config.guess`
|
TRIPLET=`./depends/config.guess`
|
||||||
PREFIX="$(pwd)/depends/$TRIPLET"
|
PREFIX="$(pwd)/depends/$TRIPLET"
|
||||||
|
|
||||||
make "$@" -C ./depends/ V=1 NO_QT=1
|
make "$@" -C ./depends/ V=1 NO_QT=1 NO_PROTON=1
|
||||||
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \
|
CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \
|
||||||
|
|||||||
Reference in New Issue
Block a user