Browse Source

Update 'vrsc.md'

master
Duke Leto 2 years ago
parent
commit
975e51695a
  1. 17
      vrsc.md

17
vrsc.md

@ -40,4 +40,21 @@ The list is not encrypted, it actually just masks each txid with a fixed number,
So the code, to recover the real transaction id, applies the mask to each "jumbled" txid to get the real txid. The purpose of this is so you cannot search the source code for transaction id's AND you cannot look at the source code and look something up on the explorer.
Another important part of the backdoor is the `CLaunchMap` class defined here: https://github.com/miketout/VerusCoin/blob/master/src/coins.h#L460 . The internals of the code calls the backdoor a LaunchMap in the `lmap` variable. This line of code: https://github.com/miketout/VerusCoin/blob/master/src/coins.h#L475 is what creates a custom "script" for a transaction:
```
lmap[hash].scriptPubKey << OP_DUP << OP_HASH160 << address << OP_EQUALVERIFY << OP_CHECKSIG;
```
Bitcoin Protocol uses something called "Bitcoin Script" language to define transactions and what they do. The above script would not be able to be created via the normal CLI (verus-cli) so it's done manually in the code. The internals of Bitcoin, KMD and VRSC would not normally be able to do this, but Mike defined a new function which does less error checking called `GetKeyID_NoCheck()` to accomplish this.
The data which the "launch map" returns (the list of transaction id's which can be spent by the special whitelist address listed in source code) is of the type `CTransactionExceptionData`. The line of code which actually "unjumbles" the transaction id's is at : https://github.com/miketout/VerusCoin/blob/master/src/coins.cpp#L577 where you can see it does:
```
if ((txData.voutMask & (((uint64_t)1) << (uint64_t)input.prevout.n)) != 0)
{
return txData.scriptPubKey;
}
```
the list "mask" for every transaction id is called `voutMask` and it is bitwise AND'ed with the jumbled tx data to get the real transaction id. In that case, the custom `scriptPubKey` is returned. If not, then the default happens, which is to only allow an address which owns funds to actually spend them.

Loading…
Cancel
Save