Skip to content

Commit

Permalink
Merge pull request KomodoPlatform#528 from Asherda/release-v1.0.11
Browse files Browse the repository at this point in the history
Release v1.0.11
  • Loading branch information
Asherda authored Jun 20, 2023
2 parents 9b6b85d + 185d1a5 commit 8f1700f
Show file tree
Hide file tree
Showing 16 changed files with 329 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ stages:
########################################################################################################################
variables:

VERSION: 1.0.10-1
VERSION: 1.0.11

VERUS_CLI_ARM64_LINUX: Verus-CLI-Linux-v${VERSION}-arm64.tar.gz
VERUS_CLI_LINUX_X86_64: Verus-CLI-Linux-v${VERSION}-x86_64.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

## VerusCoin version 1.0.10-1
## VerusCoin version 1.0.11

Arguably the world's most advanced technology, zero knowledge privacy enabled, multi-chain blockchain protocol, Verus Public Blockchains as a Service (PBaaS) combines Sapling zero knowledge technology with an intelligent, multi-chain, provable protocol, using interchain smart transactions. Verus PBaaS also enables merge mining and cross-chain staking with a completely original, combined proof of stake/proof of work consensus algorithm, Proof of Power, that can be mined on CPUs and mobile phones, and also solves the nothing at stake problem. With this and its approach towards CPU mining and ASICs, Verus Coin strives to be one of the most naturally decentralizing and attack resistant blockchain networks in existence.

Expand Down
2 changes: 1 addition & 1 deletion doc/man/verus-cli/linux/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VerusCoin Command Line Tools v1.0.10-1
VerusCoin Command Line Tools v1.0.11

Contents:
verusd - VerusCoin daemon
Expand Down
2 changes: 1 addition & 1 deletion doc/man/verus-cli/mac/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VerusCoin Command Line Tools v1.0.10-1
VerusCoin Command Line Tools v1.0.11

Contents:
verusd - VerusCoin daemon.
Expand Down
2 changes: 1 addition & 1 deletion doc/man/verus-cli/windows/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VerusCoin Command Line Tools v1.0.10-1
VerusCoin Command Line Tools v1.0.11

Contents:
verusd.exe - VerusCoin daemon
Expand Down
2 changes: 1 addition & 1 deletion src/deprecation.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// * Shut down 52 weeks' worth of blocks after the estimated release block height.
// * A warning is shown during the 2 months' worth of blocks prior to shut down.

static const int APPROX_RELEASE_HEIGHT = 2585000;
static const int APPROX_RELEASE_HEIGHT = 2588000;

static const int WEEKS_UNTIL_DEPRECATION = 52;
static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 60 * 24);
Expand Down
296 changes: 285 additions & 11 deletions src/pbaas/notarization.cpp

Large diffs are not rendered by default.

33 changes: 15 additions & 18 deletions src/pbaas/pbaas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ bool PrecheckCrossChainImport(const CTransaction &tx, int32_t outNum, CValidatio
}
if (reserveMap != expectedReserves ||
reserveInMap != expectedReserves ||
(((notarization.currencyState.IsPrelaunch() && ConnectedChains.CheckZeroViaOnlyPostLaunch(height)) ||
(((notarization.currencyState.IsPrelaunch() && ConnectedChains.CheckZeroViaOnlyPostLaunch(height)) ||
(!notarization.currencyState.IsPrelaunch() &&
(importCurrency.GetID() != VERUS_CHAINID ||
importCurrency.launchSystemID != VERUS_CHAINID ||
Expand All @@ -663,7 +663,7 @@ bool PrecheckCrossChainImport(const CTransaction &tx, int32_t outNum, CValidatio
{
return state.Error("Invalid values in notarization currency state of definition tx: " + tx.GetHash().GetHex());
}
if (((notarization.currencyState.IsPrelaunch() && ConnectedChains.CheckZeroViaOnlyPostLaunch(height)) ||
if (((notarization.currencyState.IsPrelaunch() && ConnectedChains.CheckZeroViaOnlyPostLaunch(height)) ||
(!notarization.currencyState.IsPrelaunch() &&
importCurrency.GetID() != VERUS_CHAINID &&
(importCurrency.launchSystemID != VERUS_CHAINID ||
Expand Down Expand Up @@ -1159,7 +1159,7 @@ bool PrecheckCrossChainImport(const CTransaction &tx, int32_t outNum, CValidatio

if (notarization.IsLaunchCleared() &&
!notarization.currencyState.IsLaunchClear())
{
{
if (pbn.IsPreLaunch())
{
pbn.currencyState.SetLaunchClear(false);
Expand Down Expand Up @@ -3174,8 +3174,8 @@ bool ValidateReserveDeposit(struct CCcontract_info *cp, Eval* eval, const CTrans
CCoinbaseCurrencyState pricingState;
CCurrencyValueMap dummyCurrency, dummyCurrencyUsed, dummyCurrencyOut;

if (rtxd.AddReserveTransferImportOutputs(sourceSysDef,
destSysDef,
if (rtxd.AddReserveTransferImportOutputs(checkState.IsRefunding() ? destSysDef : sourceSysDef,
checkState.IsRefunding() ? sourceSysDef : destSysDef,
destCurDef,
checkState,
reserveTransfers,
Expand Down Expand Up @@ -3221,7 +3221,7 @@ bool ValidateReserveDeposit(struct CCcontract_info *cp, Eval* eval, const CTrans
checkState.RevertReservesAndSupply(ASSETCHAINS_CHAINID,
(destCurDef.IsGatewayConverter() && destCurDef.gatewayID == ASSETCHAINS_CHAINID) ||
(!IsVerusActive() && destCurDef.GetID() == ASSETCHAINS_CHAINID),
isUpdatedConversion ?
isUpdatedConversion ?
(ConnectedChains.CheckClearConvert(nHeight) ?
CCoinbaseCurrencyState::PBAAS_1_0_10 :
CCoinbaseCurrencyState::PBAAS_1_0_8) :
Expand All @@ -3235,8 +3235,8 @@ bool ValidateReserveDeposit(struct CCcontract_info *cp, Eval* eval, const CTrans

CCurrencyValueMap importedCurrency, gatewayCurrencyUsed, spentCurrencyOut;

if (!rtxd.AddReserveTransferImportOutputs(sourceSysDef,
destSysDef,
if (!rtxd.AddReserveTransferImportOutputs(checkState.IsRefunding() ? destSysDef : sourceSysDef,
checkState.IsRefunding() ? sourceSysDef : destSysDef,
destCurDef,
checkState,
reserveTransfers,
Expand Down Expand Up @@ -3316,14 +3316,17 @@ bool ValidateReserveDeposit(struct CCcontract_info *cp, Eval* eval, const CTrans

// if we are not coming directly into the source system, there must be a separate source export as well,
// so add gateway currency
if (ccxSource.sourceSystemID != ccxSource.destSystemID && ccxSource.sourceSystemID != ccxSource.destCurrencyID)
if (ccxSource.sourceSystemID != ccxSource.destSystemID)
{
if (!(checkState.IsRefunding() && destCurDef.launchSystemID == ASSETCHAINS_CHAINID) &&
authorizingImport.importCurrencyID != ccxSource.sourceSystemID)
{
return eval->Error(std::string(__func__) + ": invalid currency system import thread for import to: " + EncodeDestination(CIdentityID(destCurDef.GetID())));
}
currenciesIn += gatewayCurrencyUsed;
if (!(checkState.IsRefunding() && sourceRD.controllingCurrencyID == destSysDef.GetID()))
{
currenciesIn += gatewayCurrencyUsed;
}
}

if (newCurState.primaryCurrencyOut)
Expand Down Expand Up @@ -6835,23 +6838,17 @@ bool CConnectedChains::GetUnspentByIndex(const uint160 &indexID, std::vector<std
std::set<COutPoint> spentInMempool;
auto memPoolOuts = mempool.FilterUnspent(unconfirmedUTXOs, spentInMempool);

static LRUCache<uint256, std::pair<CTransaction, uint256>> txesBeingSpent(50, 0.3);

for (auto &oneConfirmed : confirmedUTXOs)
{
BlockMap::iterator blockIt;
std::pair<CTransaction, uint256> txAndBlkHash;
bool fromCache = false;
bool fromChain = false;
if (spentInMempool.count(COutPoint(oneConfirmed.first.txhash, oneConfirmed.first.index)) ||
(!(fromCache = txesBeingSpent.Get(oneConfirmed.first.txhash, txAndBlkHash)) &&
!(fromChain = myGetTransaction(oneConfirmed.first.txhash, txAndBlkHash.first, txAndBlkHash.second))) ||
!myGetTransaction(oneConfirmed.first.txhash, txAndBlkHash.first, txAndBlkHash.second) ||
(blockIt = mapBlockIndex.find(txAndBlkHash.second)) == mapBlockIndex.end() ||
!chainActive.Contains(blockIt->second))
{
continue;
}
txesBeingSpent.Put(oneConfirmed.first.txhash, txAndBlkHash);
oneConfirmed.second.blockHeight = blockIt->second->GetHeight();

COptCCParams p;
Expand Down Expand Up @@ -7468,7 +7465,7 @@ bool CConnectedChains::CreateLatestImports(const CCurrencyDefinition &sourceSyst
clearConvertTransition)
{
CCurrencyValueMap localExtra;

for (auto &oneDeposit : localDeposits)
{
localExtra += oneDeposit.scriptPubKey.ReserveOutValue();
Expand Down
10 changes: 10 additions & 0 deletions src/pbaas/pbaas.h
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,13 @@ class CPBaaSNotarization
CPBaaSNotarization &notarization);

bool FindEarnedNotarization(CObjectFinalization &finalization, CAddressIndexDbEntry *pEarnedNotarizationIndex=nullptr) const;
bool FindEarnedNotarizations(std::vector<CObjectFinalization> &finalization, std::vector<CAddressIndexDbEntry> *pEarnedNotarizationIndex=nullptr) const;
static bool FindFinalizedIndexByVDXFKey(const uint160 &notarizationIdxKey,
CObjectFinalization &confirmedFinalization,
CAddressIndexDbEntry &earnedNotarizationIndex);
static bool FindFinalizedIndexesByVDXFKey(const uint160 &notarizationIdxKey,
std::vector<CObjectFinalization> &confirmedFinalizations,
std::vector<CAddressIndexDbEntry> &earnedNotarizationIndex);

bool CheckCrossNotarizationProgression(const CCurrencyDefinition &curDef,
CPBaaSNotarization &priorNotarization,
Expand Down Expand Up @@ -701,6 +705,12 @@ class CPBaaSNotarization
return proofRootIt->second;
}

static bool CheckEntropyHashMatch(const uint256 &entropyHash,
const CHashCommitments &commitments,
const uint160 &currencyID,
uint32_t startingHeight,
uint32_t endHeight);

static std::vector<std::pair<uint32_t, uint32_t>>
GetBlockCommitmentRanges(uint32_t lastNotarizationHeight, uint32_t currentNotarizationHeight, uint256 entropy);

Expand Down
2 changes: 1 addition & 1 deletion src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ UniValue getgenerate(const UniValue& params, bool fHelp)
throw runtime_error(
"getgenerate\n"
"\nReturn if the server is set to mine and/or mint coins or not. The default is false.\n"
"It is set with the command line argument -gen (or komodo.conf setting gen) and -mint\n"
"It is set with the command line argument -gen and -mint (or conf file settings gen and mint)\n"
"It can also be set with the setgenerate call.\n"
"\nResult\n"
"{\n"
Expand Down
6 changes: 3 additions & 3 deletions src/rpc/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ UniValue validateaddress(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"validateaddress \"komodoaddress\"\n"
"\nReturn information about the given Komodo address.\n"
"validateaddress \"address\"\n"
"\nReturn information about the given transparent address.\n"
"\nArguments:\n"
"1. \"komodoaddress\" (string, required) The Komodo address to validate\n"
"1. \"address\" (string, required) The transparent address to validate\n"
"\nResult:\n"
"{\n"
" \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n"
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ UniValue getaddednodeinfo(const UniValue& params, bool fHelp)
" \"connected\" : true|false, (boolean) If connected\n"
" \"addresses\" : [\n"
" {\n"
" \"address\" : \"192.168.0.201:8233\", (string) The Komodo server host and port\n"
" \"address\" : \"192.168.0.201:8233\", (string) The server host and port\n"
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
" }\n"
" ,...\n"
Expand Down
4 changes: 3 additions & 1 deletion src/rpc/pbaasrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11838,7 +11838,9 @@ UniValue registernamecommitment(const UniValue& params, bool fHelp)
"registernamecommitment \"name\" \"controladdress\" (\"referralidentity\") (\"parentnameorid\") (\"sourceoffunds\")\n"
"\nRegisters a name commitment, which is required as a source for the name to be used when registering an identity. The name commitment hides the name itself\n"
"while ensuring that the miner who mines in the registration cannot front-run the name unless they have also registered a name commitment for the same name or\n"
"are willing to forfeit the offer of payment for the chance that a commitment made now will allow them to register the name in the future.\n"
"are willing to forfeit the offer of payment for the chance that a commitment made now will allow them to register the name in the future.\n\n"

"Names must not have leading, trailing, or multiple consecutive spaces and must not include any of the following characters between parentheses (\\/:*?\"<>|@)\n"

"\nArguments\n"
"\"name\" (string, required) the unique name to commit to. creating a name commitment is not a registration, and if one is\n"
Expand Down
6 changes: 3 additions & 3 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
" \"reqSigs\" : n, (numeric) The required sigs\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
" \"addresses\" : [ (json array of string)\n"
" \"komodoaddress\" (string) Komodo address\n"
" \"address\" (string) transparent address\n"
" ,...\n"
" ]\n"
" }\n"
Expand Down Expand Up @@ -937,7 +937,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
" \"reqSigs\" : n, (numeric) The required sigs\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
" \"addresses\" : [ (json array of string)\n"
" \"RTZMZHDFSTFQst8XmX2dR4DaH87cEUs3gC\" (string) komodo address\n"
" \"RTZMZHDFSTFQst8XmX2dR4DaH87cEUs3gC\" (string) transparent address\n"
" ,...\n"
" ]\n"
" }\n"
Expand Down Expand Up @@ -1008,7 +1008,7 @@ UniValue decodescript(const UniValue& params, bool fHelp)
" \"type\":\"type\", (string) The output type\n"
" \"reqSigs\": n, (numeric) The required signatures\n"
" \"addresses\": [ (json array of string)\n"
" \"address\" (string) Komodo address\n"
" \"address\" (string) transparent address\n"
" ,...\n"
" ],\n"
" \"p2sh\",\"address\" (string) script address\n"
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ UniValue stop(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"stop\n"
"\nStop Komodo server.");
"\nStop the server.");

#ifdef ENABLE_WALLET
GenerateBitcoins(false, NULL, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ static const int MEMPOOL_GD_VERSION = 60002;
static const int NO_BLOOM_VERSION = 170004;

#define KOMODO_VERSION "0.2.1"
#define VERUS_VERSION "1.0.10-1"
#define VERUS_VERSION "1.0.11"

#endif // BITCOIN_VERSION_H

0 comments on commit 8f1700f

Please sign in to comment.