Browse Source

Merge pull request #358 from VerusCoin/dev

Dev
pull/433/head v0.8.0-3
Asher Dawes 3 years ago
committed by GitHub
parent
commit
d6c4d90db8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .gitlab-ci.yml
  2. 2
      README.md
  3. 2
      doc/man/verus-cli/linux/README.txt
  4. 2
      doc/man/verus-cli/mac/README.txt
  5. 2
      doc/man/verus-cli/windows/README.txt
  6. 2
      src/deprecation.h
  7. 18
      src/mmr.h
  8. 12
      src/pbaas/ethproof.cpp
  9. 2
      src/version.h

2
.gitlab-ci.yml

@ -7,7 +7,7 @@ stages:
########################################################################################################################
variables:
VERSION: 0.8.0-2
VERSION: 0.8.0-3
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

2
README.md

@ -1,5 +1,5 @@
## VerusCoin version 0.8.0-2
## VerusCoin version 0.8.0-3
Arguably the world's most advanced technology, zero knowledge privacy-centric blockchain, Verus Coin brings Sapling performance and zero knowledge features to an intelligent system with interchain smart contracts and a completely original, combined proof of stake/proof of work consensus algorithm that 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 blockchains in existence.

2
doc/man/verus-cli/linux/README.txt

@ -1,5 +1,5 @@
VerusCoin Command Line Tools v0.8.0-2
VerusCoin Command Line Tools v0.8.0-3
Contents:
verusd - VerusCoin daemon

2
doc/man/verus-cli/mac/README.txt

@ -1,5 +1,5 @@
VerusCoin Command Line Tools v0.8.0-2
VerusCoin Command Line Tools v0.8.0-3
Contents:
verusd - VerusCoin daemon.

2
doc/man/verus-cli/windows/README.txt

@ -1,5 +1,5 @@
VerusCoin Command Line Tools v0.8.0-2
VerusCoin Command Line Tools v0.8.0-3
Contents:
verusd.exe - VerusCoin daemon

2
src/deprecation.h

@ -9,7 +9,7 @@
// * Shut down 20 weeks' worth of blocks after the estimated release block height.
// * A warning is shown during the 2 weeks' worth of blocks prior to shut down.
static const int APPROX_RELEASE_HEIGHT = 1735000;
static const int APPROX_RELEASE_HEIGHT = 1736000;
static const int WEEKS_UNTIL_DEPRECATION = 20;
static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 60 * 24);

18
src/mmr.h

@ -558,6 +558,7 @@ class CPATRICIABranch : public CMerkleBranchBase
public:
std::vector<std::vector<unsigned char>> accountProof;
uint64_t balance;
uint256 bigBalance;
uint64_t nonce;
uint256 storageHash;
uint256 storageProofKey;
@ -565,7 +566,7 @@ public:
std::vector<uint256> branch;
CRLPProof proofdata;
CRLPProof storageProof;
uint160 address;
uint160 address;
CPATRICIABranch() {}
CPATRICIABranch(std::vector<std::vector<unsigned char>> a, std::vector<std::vector<unsigned char>> b) : accountProof(a), storageProof(b) {}
@ -597,12 +598,27 @@ public:
READWRITE(storageProofKey);
READWRITE(storageProof);
READWRITE(storageProofValue);
if (balance == -1)
{
READWRITE(bigBalance);
}
}
uint256 SafeCheck(uint256 hash)
{
return verifyStorageProof(hash);
}
std::vector<unsigned char> GetBalanceAsBEVector() const
{
arith_uint256 bigValue;
std::vector<unsigned char> vecVal;
for (bigValue = balance == 0xffffffffffffffff ? UintToArith256(bigBalance) : arith_uint256(balance); bigValue > 0; bigValue = bigValue >> 8)
{
vecVal.insert(vecVal.begin(), (unsigned char)(bigValue & 0xff).GetLow64());
}
return vecVal;
}
};
typedef CPATRICIABranch<CHashWriter> CETHPATRICIABranch;

12
src/pbaas/ethproof.cpp

@ -407,8 +407,6 @@ uint256 CPATRICIABranch<CHashWriter>::verifyStorageProof(uint256 ccExporthash){
//Check the storage value hash, which is the hash of the crosschain export transaction
//matches the the RLP decoded information from the bridge keeper
std::vector<unsigned char> ccExporthash_vec(ccExporthash.begin(),ccExporthash.end());
RLP rlp;
try{
@ -454,16 +452,18 @@ uint256 CPATRICIABranch<CHashWriter>::verifyStorageProof(uint256 ccExporthash){
//rlp encode the nonce , account balance , storageRootHash and codeHash
std::vector<unsigned char> encodedAccount;
std::vector<unsigned char> storage(storageHash.begin(),storageHash.end());
try{
try
{
std::vector<std::vector<unsigned char>> toEncode;
toEncode.push_back(ParseHex(uint64_to_hex(nonce)));
toEncode.push_back(uint64_to_vec(balance));
toEncode.push_back(GetBalanceAsBEVector());
toEncode.push_back(storage);
std::vector<unsigned char> codeHash_vec(codeHash.begin(),codeHash.end());
toEncode.push_back(codeHash_vec);
encodedAccount = rlp.encode(toEncode);
}catch(const std::invalid_argument& e){
}
catch(const std::invalid_argument& e)
{
LogPrintf("RLP Encode failed : %s\n", e.what());
memset(&stateRoot,0,stateRoot.size());
return stateRoot;

2
src/version.h

@ -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 "0.8.0-2"
#define VERUS_VERSION "0.8.0-3"
#endif // BITCOIN_VERSION_H

Loading…
Cancel
Save