Social Icons

Showing posts with label multichain blockchain. Show all posts
Showing posts with label multichain blockchain. Show all posts

Sunday, December 12, 2021

Multichain : Appending Data to Blockchain with DATA STREAMS

 
MultiChain streams enable a blockchain to be used as a general purpose append-only database, with the blockchain providing time stamping, notarization and immutability. This video continues from the earlier video post in playlist and now focuses on populating data in the "nutsbolts" blockchain created earlier. 
 
Erstwhile seen node "A" creates a data stream data1, populates some sample data, which is immediately visible in the other node "B". Node A further grants exclusive permissions to Node "B" for send and writing to data stream data1. The complete demonstration is shown on two separate Linux machines as introduced in M-1 and M-2 videos in Multichain playlist i.e. Node A and Node B. data stream created name: "data1" 
 
 Commands used
 
create stream data1 '{"restrict":"write"}' 
 
listpermissions data1.* publish data1 key1 '{"json":{"name":"kabali","city":"chennai"}}' 
 
liststreams 
 
subscribe data1 
 
liststreamitems data1 
 
grant 1...send 
 
grant 1...data1.write 
 
publish data1 key2 '{"json":{"name":"baasha","city":"mumbai"}}' 
 
subscribe data1 
 
liststreamitems data1 
 
liststreamkeys data1 
 
liststreamkeyitems data1 key1 
 
liststreampublishers data1 
 
liststreampublisheritems data1 1...

Multichain : How to Connect-Receive-Send to a Blockchain node?

Continuing from the first video that was peculiar to basic instruction and installation of Multichain blockchain platform on Node A, this video moves further by connecting another node B. Node B is a independent node on the network in which the Multichain blockchain application is already installed exactly with the steps seen in the first video of Multichain playlist . The set of commands used in this videos are available as below:

Node A 
First command onwards 
multichain-util create nutsbolts 
multichaind nutsbolts -daemon 
 
 Node B multichaind nutsbolts@192.168.10.19:4265 (IP is as I have configured and you are free to choose ur configuration as u wish) and you will get a unique address starting with 1...... 
 
Node A multichain-cli nutsbolts grant 1... connect send receive (Here with you grant exclusive permission to Node B from Node A Node B 
 
multichaind nutsbolts -daemon (Now the blockchain network will be seen connected to) 
 
To get into interactive shell mode simply type this command at both the node terminals 
 
multichain-cli nutsbolts 
and then on either terminal use the following commands to get useful info of the created blockchain and network peers 
 
getinfo : See a list of all available commands: 
help : Show all permissions currently assigned: 
listpermissions : List the addresses in the wallet: 
listaddresses : For each node, get a list of connected peers: 
getpeerinfo: Get peer info of connected nodes
 
 
Powered By Blogger