[Ethereum] What does “intrinsic gas too low” mean


I'm running the Mist wallet, and I've deployed this contract to testnet (from https://ethereum.stackexchange.com/a/179/520) :

contract Notary{
    struct Document {
        uint timestamp;
        bytes ipfs_hash;
        address[] signatures;
    mapping(address => bytes[]) public users; //maps addresses to ipfs document hashes
    mapping(bytes32 => Document) public documents; //maps sha3(ipfs) hashes to documents

    function addDocument(bytes ipfs) public {
        users[msg.sender].push(ipfs); //Add document to users's "signed" list
        address[] memory sender;
        sender[0] = msg.sender;
        documents[sha3(ipfs)] = Document(block.timestamp, ipfs, sender);

    function signDocument(bytes ipfs) public {


When I try to execute the addDocument function though, I get "intrinsic gas too low". What does this mean? Also before confirming execution, it says: "Data can't be executed, so it will use all provided gas."

Best Answer

The intrinsic gas for a transaction is the amount of gas that the transaction uses before any code runs. It is a constant “transaction fee” (currently 21000 gas) plus a fee for every byte of data supplied with the transaction (4 gas for a zero byte, 68 gas for non-zeros). These constants are all currently defined for geth in params/protocol_params.go. Presumably they are also coded into the source for the other node/client implementations as well.