I sent a transaction to my BigchainDB instance.
bdb = BigchainDB(url_of_instance_with_port)
If I run
bdb.transactions.retrieve(txid)
, I get the following:
{'inputs': [{'owners_before': ['31LBKyjyd6GEA7R88mnHwthMf2ygtyB8xGDv1dZHfkqu'],
'fulfills': None,
'fulfillment': 'pGSAIB3NDv0SG46f7PYdtgzMezpc8Kq8F1nR0Y1Brwe5zbkQgUDWwwaRXj4yx9Z49f76L33feu9iUhNYUs0B3oPyLllUDZrHopIoHRt0FeBLd_5Yt-m1riyc3-0jYNdM0VAyGwAG'}],
'outputs': [{'public_keys': ['31LBKyjyd6GEA7R88mnHwthMf2ygtyB8xGDv1dZHfkqu'],
'condition': {'details': {'type': 'ed25519-sha-256',
'public_key': '31LBKyjyd6GEA7R88mnHwthMf2ygtyB8xGDv1dZHfkqu'},
'uri': 'ni:///sha-256;cfREMIEIaEdXKEfokspCcfiu9jSYvlfeq6zwdj2x3Fw?fpt=ed25519-sha-256&cost=131072'},
'amount': '1'}],
'operation': 'CREATE',
'metadata': {...},
'asset': {...},
'version': '2.0',
'id': '61b7f06a106d7db4e5cbaaf23f160d934c7e6e5ef6ab1df7c1eefca1def6ea18'}
However, bdb.blocks.get(txid)
times out and the block states remain the same i.e. even the block zero doesn't contain any transactions. Why? How may I debug further?
That brings up another question I have, what is the notion of mining in BigchainDB? When is a block created?
If the bdb.blocks.get(txid)
call times out, then that might be a bug in the Python driver, unless the BigchainDB network was down when you made the call, in which case of course it timed out. Can you try again, i.e. post a new transaction and then do bdb.blocks.get(txid)
. If it times out again, then maybe try the same HTTP request with your web browser, i.e. put something like this in your address bar:
http://your-hostname:port/api/v1/blocks?transaction_id=blahblahblah
and press Enter and see if it works. If not, then something is wrong with the node. If it does work, then something is wrong with the Python driver.
If something is wrong with the Python driver, please file a new issue at https://github.com/bigchaindb/bigchaindb-driver/issues/new
About Mining
BigchainDB nodes don't do anything like the "mining" that some Bitcoin or Ethereum nodes do. The nodes in a BigchainDB network achieve Byzantine fault-tolerant (BFT) consensus in a different way, using the Tendermint consensus mechanism. The theory and practice of BFT consensus go back to the late 1970s (although the BFT terminology only arose in the early 1980s), so it's not a new idea; Tendermint is just one of the newer BFT consensus algorithms/protocols.