Skip to content

Commit

Permalink
Merge pull request #799 from RavenProject/develop
Browse files Browse the repository at this point in the history
4.2.1 private to public master
  • Loading branch information
TronBlack authored Jul 9, 2020
2 parents bf95ab4 + 8c32ad6 commit 782e622
Show file tree
Hide file tree
Showing 15 changed files with 260 additions and 38 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 2)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2020)
Expand Down
24 changes: 12 additions & 12 deletions roadmap/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Ravencoin Roadmap

### Phase 1 - Complete
### Phase 1 - (Complete)

Ravencoin (RVN) is a Proof of Work coin built on the Bitcoin UTXO model. As with other Bitcoin derivatives, RVN coins are distributed to persons augmenting the Raven network by mining Raven.
* x1000 coin distribution (21 Billion Total)
* 10x faster blocks (1 per minute)
* In app CPU mining
* In app CPU verification, with GPU specific PoW decentralised mining
* Dark Gravity Wave difficulty adjustment (180 block average)
* Addresses start with R... for regular addresses, or r... for multisig
* Network Port: 8767
Expand All @@ -15,7 +15,7 @@ Ravencoin (RVN) is a Proof of Work coin built on the Bitcoin UTXO model. As with

#### ASIC Resistance

ASIC Resistance - A published commitment to continual attempts at ASIC resistance. If ASICs are created for x16r, then we will, at a specific block number, modify one of the algorithms to add some varients of Equihash or similar efforts to increase the resistance to ASIC miners for Raven.
ASIC Resistance - A published commitment to continual attempts at ASIC resistance. If ASICs are created for x16r, then we will, at a specific block number, modify one of the algorithms to add some varients of Equihash or similar efforts to increase the resistance to ASIC miners for Raven. ASIC's have been developed for X16R (and X16RV2) and the community has forked to KAWPOW (a variant of ethash and progpow) to maximise the ASIC resistance by reducing the potential efficiency increase of ASICs by requiring the feature set and capabilities within over the counter consumer graphics cards. We are not anticipating future forks to change the algorithm as the current algorithm allows a fair distribution of RVN via PoW to the community.

#### Asset Support

Expand All @@ -35,7 +35,7 @@ AB
.FIRST
apple

The RVN used to issue assets will be sent to a burn address, which will reduce the amount of RVN available.
The RVN used to issue assets will be sent to a burn address, which will reduce the amount of RVN available.

Asset transfers require the standard RVN transaction fees for transfer from one address to another.

Expand All @@ -45,7 +45,7 @@ Metadata about the token can be stored in IPFS.

#### Rewards

Reward capabilities will be added to allow payment (in RVN) to all holders of an asset. Payments of RVN would be distributed to all asset holders pro rata. This is useful for paying dividends, dividing payments, or rewarding a group of token holders.
Reward capabilities will be added to allow payment (in RVN) to all holders of an asset. Payments of RVN would be distributed to all asset holders pro rata. This is useful for paying dividends, dividing payments, or rewarding a group of token holders.

Example: A small software company issues an asset GAMECO that represents a share of the project. GAMECO tokens can be traded with others. Once the software company profits, those profits can be distributed to all holders of GAMECO by sending the profits (via RVN) to all holders of GAMECO.

Expand All @@ -65,11 +65,10 @@ Once created, assets can be made unique for a cost of 5 RVN. Only non-divisible
The costs to make unique assets will be sent to a burn address.

Some examples of unique assets:
* Imagine that an art dealer issues the asset named ART. The dealer can then make unique ART assets by attaching a name or a serialized number to each piece of art. These unique tokens can be transferred to the new owner along with the artwork as a proof of authenticity. The tokens ART:MonaLisa and ART:VenusDeMilo are not fungible and represent distinct pieces of art.
* A software developer can issue the asset with the name of their software ABCGAME, and then assign each ABCGAME token a unique id or license key. The game tokens could be transferred as the license transfers. Each token ABCGAME:398222 and ABCGAME:
are unique tokens.
* In game assets. A game ZYX_GAME could create unique limited edition in-game assets that are owned and used by the game player. Example: ZYX_GAME:Sword005 and ZYX_GAME:Purse
* RVN based unique assets can be tied to real world assets. Create an asset named GOLDVAULT. Each gold coin or gold bar in a vault can be serialized and audited. Associated unique assets GOLDVAULT:444322 and GOLDVAULT:555994 can be created to represent the specific assets in the physical gold vault. The public nature of the chain allows for full transparency.
* Imagine that an art dealer issues the asset named ART. The dealer can then make unique ART assets by attaching a name or a serialized number to each piece of art. These unique tokens can be transferred to the new owner along with the artwork as a proof of authenticity. The tokens ART#MonaLisa and ART#VenusDeMilo are not fungible and represent distinct pieces of art.
* A software developer can issue the asset with the name of their software ABCGAME, and then assign each ABCGAME token a unique id or license key. The game tokens could be transferred as the license transfers. Each token ABCGAME#398222 and ABCGAME#398223 are unique tokens.
* In game assets. A game ZYX_GAME could create unique limited edition in-game assets that are owned and used by the game player. Example: ZYX_GAME#Sword005 and ZYX_GAME#Purse
* RVN based unique assets can be tied to real world assets. Create an asset named GOLDVAULT. Each gold coin or gold bar in a vault can be serialized and audited. Associated unique assets GOLDVAULT#444322 and GOLDVAULT#555994 can be created to represent the specific assets in the physical gold vault. The public nature of the chain allows for full transparency.

### Phase 5 - Messaging

Expand All @@ -93,7 +92,7 @@ Speeds adoption into the larger crypto ecosystem.
[More on compatibility mode...](./compatibility-mode/README.md)


### Phase 8 - Mobile Wallet compatible Mnemonic Seed
### Phase 8 - Mobile Wallet compatible Mnemonic Seed (Complete)

Switches to a default of generating a 128 bit seed from which the master key is generated. This allows easy backup for anyone that doesn't import private keys. Warnings added to back up wallet.dat when importing private keys.

Expand All @@ -106,7 +105,7 @@ Issue an asset with unique name. Unit as 1 for whole units, or 0.00000001 for sa
original issuer.

`issueunique (root_name, asset_tags, ipfs_hash, to_address, change_address) `
Creates a unique asset from a pool of assets with a specific name. Example: If the asset name is SOFTLICENSE, then this could make unique assets like SOFTLICENSE:38293 and SOFTLICENSE:48382 This would be called once per unique asset needed.
Creates a unique asset from a pool of assets with a specific name. Example: If the asset name is SOFTLICENSE, then this could make unique assets like SOFTLICENSE#38293 and SOFTLICENSE#48382 This would be called once per unique asset needed.

`reissue (reissue asset_name, qty, to_address, change_address, reissuable, new_unit, new_ipfs )`
Issue more of a specific asset. This is only allowed by the original issuer of the asset and if the reissuable flag was set to true at the time of original issuance.
Expand All @@ -128,3 +127,4 @@ Lists addresses by asset.

`getassetdata (asset_name)`
Lists asset data of an asset.

15 changes: 15 additions & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ class CMainParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nTimeout = 1620324000; // UTC: Thu May 06 2021 18:00:00
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nOverrideRuleChangeActivationThreshold = 1714; // Approx 85% of 2016
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nOverrideMinerConfirmationWindow = 2016;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].bit = 9;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nStartTime = 1593453600; // UTC: Mon Jun 29 2020 18:00:00
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nTimeout = 1624989600; // UTC: Mon Jun 29 2021 18:00:00
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nOverrideRuleChangeActivationThreshold = 1411; // Approx 70% of 2016
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nOverrideMinerConfirmationWindow = 2016;

// The best chain should have at least this much work
consensus.nMinimumChainWork = uint256S("000000000000000000000000000000000000000000000020d4ac871fb7009b63"); // Block 1186833
Expand Down Expand Up @@ -302,6 +307,11 @@ class CTestNetParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nTimeout = 1618509600; // UTC: Thu Apr 15 2021 18:00:00
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nOverrideRuleChangeActivationThreshold = 1310;
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nOverrideMinerConfirmationWindow = 2016;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].bit = 9;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nStartTime = 1593453600; // UTC: Mon Jun 29 2020 18:00:00
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nTimeout = 1624989600; // UTC: Mon Jun 29 2021 18:00:00
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nOverrideRuleChangeActivationThreshold = 1411; // Approx 70% of 2016
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nOverrideMinerConfirmationWindow = 2016;

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000168050db560b4");
Expand Down Expand Up @@ -512,6 +522,11 @@ class CRegTestParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nTimeout = 999999999999ULL;
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nOverrideRuleChangeActivationThreshold = 208;
consensus.vDeployments[Consensus::DEPLOYMENT_TRANSFER_SCRIPT_SIZE].nOverrideMinerConfirmationWindow = 288;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].bit = 9;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nStartTime = 0;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nTimeout = 999999999999ULL;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nOverrideRuleChangeActivationThreshold = 108;
consensus.vDeployments[Consensus::DEPLOYMENT_ENFORCE_VALUE].nOverrideMinerConfirmationWindow = 144;

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x00");
Expand Down
1 change: 1 addition & 0 deletions src/consensus/consensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static const size_t MIN_SERIALIZABLE_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR *
UNUSED_VAR static bool fAssetsIsActive = false;
UNUSED_VAR static bool fRip5IsActive = false;
UNUSED_VAR static bool fTransferScriptIsActive = false;
UNUSED_VAR static bool fEnforcedValuesIsActive = false;

unsigned int GetMaxBlockWeight();
unsigned int GetMaxBlockSerializedSize();
Expand Down
1 change: 1 addition & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enum DeploymentPos
DEPLOYMENT_ASSETS, // Deployment of RIP2
DEPLOYMENT_MSG_REST_ASSETS, // Delpoyment of RIP5 and Restricted assets
DEPLOYMENT_TRANSFER_SCRIPT_SIZE,
DEPLOYMENT_ENFORCE_VALUE,
// DEPLOYMENT_CSV, // Deployment of BIP68, BIP112, and BIP113.
// DEPLOYMENT_SEGWIT, // Deployment of BIP141, BIP143, and BIP147.
// NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp
Expand Down
23 changes: 22 additions & 1 deletion src/consensus/tx_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
return nSigOps;
}

bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fCheckDuplicateInputs)
bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fCheckDuplicateInputs, bool fMempoolCheck, bool fBlockCheck)
{
// Basic checks that don't depend on any context
if (tx.vin.empty())
Expand Down Expand Up @@ -308,6 +308,27 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fChe
// Specific check and error message to go with to make sure the amount is 0
if (txout.nValue != 0)
return state.DoS(100, false, REJECT_INVALID, "bad-txns-asset-issued-amount-isn't-zero");
} else if (nType == TX_REISSUE_ASSET) {
// Specific check and error message to go with to make sure the amount is 0
if (AreEnforcedValuesDeployed()) {
// We only want to not accept these txes when checking them from CheckBlock.
// We don't want to change the behavior when reading transactions from the database
// when AreEnforcedValuesDeployed return true
if (fBlockCheck) {
if (txout.nValue != 0) {
return state.DoS(0, false, REJECT_INVALID, "bad-txns-asset-reissued-amount-isn't-zero");
}
}
}

if (fMempoolCheck) {
// Don't accept to the mempool no matter what on these types of transactions
if (txout.nValue != 0) {
return state.DoS(0, false, REJECT_INVALID, "bad-mempool-txns-asset-reissued-amount-isn't-zero");
}
}
} else {
return state.DoS(0, false, REJECT_INVALID, "bad-asset-type-not-any-of-the-main-three");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/consensus/tx_verify.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CNullAssetTxData;
/** Transaction validation functions */

/** Context-independent validity checks */
bool CheckTransaction(const CTransaction& tx, CValidationState& state, bool fCheckDuplicateInputs=true);
bool CheckTransaction(const CTransaction& tx, CValidationState& state, bool fCheckDuplicateInputs=true, bool fMempoolCheck = false, bool fBlockCheck = false);

namespace Consensus {
/**
Expand Down
17 changes: 10 additions & 7 deletions src/qt/ravengui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,43 +862,46 @@ void RavenGUI::createToolBars()

// List the found values
QStringList list = rx.capturedTexts();
static const int CLIENT_VERSION_MAJOR_INDEX = 1;
static const int CLIENT_VERSION_MINOR_INDEX = 2;
static const int CLIENT_VERSION_REVISION_INDEX = 3;
bool fNewSoftwareFound = false;
bool fStopSearch = false;
if (list.size() >= 4) {
if (MAIN_SOFTWARE_VERSION < list[1].toInt()) {
if (CLIENT_VERSION_MAJOR < list[CLIENT_VERSION_MAJOR_INDEX].toInt()) {
fNewSoftwareFound = true;
} else {
if (MAIN_SOFTWARE_VERSION > list[1].toInt()) {
if (CLIENT_VERSION_MAJOR > list[CLIENT_VERSION_MAJOR_INDEX].toInt()) {
fStopSearch = true;
}
}

if (!fStopSearch) {
if (SECOND_SOFTWARE_VERSION < list[2].toInt()) {
if (CLIENT_VERSION_MINOR < list[CLIENT_VERSION_MINOR_INDEX].toInt()) {
fNewSoftwareFound = true;
} else {
if (SECOND_SOFTWARE_VERSION > list[2].toInt()) {
if (CLIENT_VERSION_MINOR > list[CLIENT_VERSION_MINOR_INDEX].toInt()) {
fStopSearch = true;
}
}
}

if (!fStopSearch) {
if (THIRD_SOFTWARE_VERSION < list[3].toInt()) {
if (CLIENT_VERSION_REVISION < list[CLIENT_VERSION_REVISION_INDEX].toInt()) {
fNewSoftwareFound = true;
}
}
}

if (fNewSoftwareFound) {
labelVersionUpdate->setToolTip(QString::fromStdString(strprintf("Currently running: %s\nLatest version: %s", SOFTWARE_VERSION,
labelVersionUpdate->setToolTip(QString::fromStdString(strprintf("Currently running: %s\nLatest version: %s", FormatFullVersion(),
latestVersion)));
labelVersionUpdate->show();

// Only display the message on startup to the user around 1/2 of the time
if (GetRandInt(2) == 1) {
bool fRet = uiInterface.ThreadSafeQuestion(
strprintf("\nCurrently running: %s\nLatest version: %s", SOFTWARE_VERSION,
strprintf("\nCurrently running: %s\nLatest version: %s", FormatFullVersion(),
latestVersion) + "\n\nWould you like to visit the releases page?",
"",
"New Wallet Version Found",
Expand Down
Loading

0 comments on commit 782e622

Please sign in to comment.