General operational questions...

+1 vote

a) When is a new block created? When a transaction is created or verified or...?

b) Under what conditions does a block fork occur? Would frequent transactions cause block forks? How frequent is frequent enough (time between transactions) to cause issues?

c) Does each node in the "Getting Started" tutorial contain the entire blockchain including genesis block?

d) For non-financial use cases, can you give an example of how a wallet would be relevant? In a financial use case, a wallet contains a bunch of transactions which affect the balance remaining in wallet. 

But in non-financial use case (use MultiChain as a distributed storage), we're mainly interested in having fewer wallets but more assets where each node can see all assets & their metadata. I'm assuming this is possible with MultiChain.

e) Which API call returns all transactions for a given asset? Does getassetbalances return metadata?

f) If a node crashes, how do we recover it back?

g) If all nodes crash, is data lost? How do you recommend to triage the blockchain and recover it?

h) In Section 6. Transaction metadata, why is it necessary to call preparelockunspent, and signrawtransaction? What would happen if preparelockunspent & signrawtransaction were not called?

related to an answer for: blockchain explorer
asked Oct 14, 2015 by babalu
edited Oct 14, 2015 by babalu

1 Answer

+1 vote
 
Best answer

a) A new block is created at more-or-less regular time intervals, based on the target-block-time value in the blockchain parameters.

b) Block forks can occur if two nodes create a block at the same time. This is why target-block-time should not be set too low. Block forks are not directly related to transaction volumes.

c) Yes, every MultiChain node has a full copy of the entire blockchain.

d) You need a wallet in MultiChain, even for non-financial uses, because a wallet contains the private keys that belong to that node. Those keys are used for identification when connecting peer-to-peer, and to sign any transaction which is created by that node. (In a permissioned blockchain, without that signature, the transaction would not be permitted.)

e) There is no API that returns all transactions for a given asset. This is the sort of thing you would need a blockchain explorer for.

f) If a node crashes, simply restart multichaind for that node. If you're concerned about data loss, you can always back up the wallet.dat file for that node.

g) If all nodes crash, and for some reason all their data is lost, then that's the end of that. So you could back up the entire ~/.multichain/[chain-name]/ directory for one node. That would also include that node's wallet.dat file.

h) The preparelockunspent call is an important step in the creation of the transaction, and signrawtransaction is required to have the transaction signed ready for sending. For this question it's probably worth reading some documentation about bitcoin to understand its transaction and signature model, on which MultiChain is based.

answered Oct 14, 2015 by MultiChain
selected Oct 14, 2015 by babalu
In the whitepaper it states, "To solve this problem, a future version of MultiChain will include a bridge between its blockchains and regular relational databases such as Oracle, SQL Server or MySQL ."

What is the ETA for this?
How often can transactions be created/sent? order of ms or mins?
MultiChain currently supports a blockchain level transaction rate of about 200 tx/sec, and around 5 tx/sec created by an individual node. This is an area of ongoing development, but that's where we are right now.
On the SQL bridge, we don't yet have an ETA. In the shorter term we (and others) will be working on making an existing bitcoin explorer work with MultiChain, and this will probably use some kind of database behind the scenes. So that might be good enough for your needs.
...