3

The white paper doesn't mention the term "coinbase" (in reference to the reward transaction).

I see the first version of the software main.cpp does:

    // First transaction must be coinbase, the rest must not be
    if (vtx.empty() || !vtx[0].IsCoinBase())
        return error("CheckBlock() : first tx is not coinbase");
    for (int i = 1; i < vtx.size(); i++)
        if (vtx[i].IsCoinBase())
            return error("CheckBlock() : more than one coinbase");
...

Did the term orginate in the Satoshi's code? Who first used the term on a forum, mailing list or other public venue?

I'm looking to trace back to the "original specification" of the coinbase transaction, if there is one.

2 Answers 2

6

The term "coinbase" was most likely coined by Satoshi through the IsCoinbase method of the CTransaction class. It was both part of the first publicly distributed version of the source code and of the (allegedly) privately shared early versions of it.

0

Who first used the term on a forum, mailing list or other public venue?

The earliest post I could find mentioning "coinbase" on bitcoin talk was on June 21, 2010 by user Laszlo:

https://bitcointalk.org/index.php?topic=198.msg1640#msg1640

I'm looking to trace back to the "original specification" of the coinbase transaction, if there is one.

As alluded to by Antoine Poinsot, it seems the original specification is the isCoinBase method of a CTransaction object, as well as its checkTransaction method:

class CTransaction
{
public:
    int nVersion;
    vector<CTxIn> vin;
    ...
    bool IsCoinBase() const
    {
        return (vin.size() == 1 && vin[0].prevout.IsNull());
    }
    ...

    bool CheckTransaction() const
    {
        ...
        if (IsCoinBase())
            {
                if (vin[0].scriptSig.size() < 2 || vin[0].scriptSig.size() > 100)
                    return error("CTransaction::CheckTransaction() : coinbase script size");
            }
        ...
        return true;
    }
    ...
}

Which I take to mean "The coinbase transaction shall be a standard transaction with exactly one null input transaction where the input scriptSig size is in the range 2 to 100 bytes."

Here, "null" is defined as a COutPoint object with hash==0 and n==-1:

class COutPoint
{
public:
    uint256 hash;
    unsigned int n;
    ...
    bool IsNull() const { return (hash == 0 && n == -1); }
    ...
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.