Post
Topic
Board Announcements (Altcoins)
Re: [ANN][Datacoin] Datacoin blockchain start announcement (Minor code upd + logo)
by
extro24
on 12/08/2017, 14:31:10 UTC
They can write the data, but no other client can read it.

In rpcwallet.cpp I saw

senddata(const Array& params, bool fHelp)

I'm not sure why your correspondent would think that. Certainly senddata must allow the user to provide a password for unlocking an encrypted wallet but there isn't any such requirement for getdata:

https://github.com/foo1inge/datacoin-hp/commit/791125b901767b9dec40e04f6865181a3276395b#diff-e75eff0ce0dde388eddbe3173db85bd4R320

Code:
Value getdata(const Array& params, bool fHelp)
{
    if (fHelp || params.size() != 1)
        throw runtime_error(
            "getdata \n"
            "Returns base64 data from a given tx-hash.");

    std::string strHash = params[0].get_str();
    uint256 hash(strHash);

    CTransaction tx;
    uint256 hashBlock = 0;
    if (!GetTransaction(hash, tx, hashBlock, true))
        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction");

    string data = tx.GetBase64Data();

    return data;
}

Or am I missing something fundamental?

Cheers

Graham


Yes, this does baffle me.  I thought data was stored without encryption, and that any other client could read it.  We will have to redo the steps that the Apertus.io team went through to understand what went on.  This seems to imply that the block explorer or DTCbrowser (or Apertus.io) must do some sort of decryption.  I also wonder of they were using a client that could not do RPC for getdata.  If I remember correctly the earliest datacoin-hp client could not do RPC.  It was mostly for mining.