Social Icons

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
 
 

Multichain Blockchain Platform: Brief Introduction & Installation

This video gives a minimal few minutes introduction to the Multichain blockchain platform followed by quick installation on an Ubuntu 20.04 OS terminal. This is one of the easiest platforms to play with and understand in much better way the mechanics of blockchain. Primarily CLI based, this video installs the multichain with few commands.

 

Why 0.1 + 0.2 = 0.30000000000000004 ?

Have you ever tried simple calculations in usual programming languages like python, ruby, rust or Java etc 

0.1 + 0.2 = 0.30000000000000004 or 

0.1 + 0.7 = 0.7999999999999999 or 

0.2 + 0.7 = 0.8999999999999999 or 0.3 - 0.1 = 0.19999999999999998 

Why do the results show something unexpected? The reason pertains to IEEE standard IEEE-754 that defines 32bit/64 bit formats for storage of numbers in computers. This presentation tries to bring out simply of where the anomaly exists and why do we get these results. Also reaffirms that the normal IEEE-754 floating point standard will not befit for usual finance and banking applications wherein few zero's can lead to undesired losses for some and unexpected gains for few.

Powered By Blogger