Why is transactions not always record to the block? - Blockchain PBFT

76 views Asked by At

I'm working with ibm's blockchain service, and what I don't quite understand is that sometimes my invoke or query doesn't result in a transaction payload being added?

Say I have a block height of 30. I now make the following call to a smart contract:

{
"method":"invoke",
"id":1,
"jsonrpc":"2.0",
"params":{
    "chaincodeID":{
        "name":"someIDHere"
    },
    "ctorMsg":{
        "args":[ "someArgsHere"
        ],
        "function":"create_user"
    },
    "secureContext":"admin",
    "type":1
}
}

The block height gets incremented to 31 and my auditor role wants to examine this new block...

With the API endpoint I call get /chain/blocks/30 (since size()-1 for new block). I thought this would result in a transaction payload? But sometimes I just receive the following

Sometimes invoke/query is not stored in a payload?

{ "stateHash":"FmmIccWFaevjks2l9OagabDookEuaw3c3FKLGBVz2vZhDLetSR+B9ufK2/EAAQXWu8nj1RFIuSzcA+P+HxUM8w==",
"previousBlockHash":"nyugEcVpmcMCWdJzrMHhpBnTHr0Vr7D2TVysVOOhfcGfU+mbj/YaiHtm9OJ/WC4RrwkSwUoNGNAbJdSGHQT8Og==",
"consensusMetadata":"CIoC",
"nonHashData":{
    "localLedgerCommitTimestamp":{
        "seconds":1482353608,
        "nanos":800785285
    },
    "chaincodeEvents":[
        {
        }
    ]
}
}

Can someone clearify this for me? Are there special circumstances where I cannot expect a new payload being added? Besides the genesis block (or other deploys)?

1

There are 1 answers

0
Mat0 On BEST ANSWER

A query doesn't result in a new block getting created. Only invoke & deploy add blocks to the network