PostMan(goto software in ubuntu and serach postman in software store)
-
Extract zip
-
Open it on terminal
-
open new tabs on terminal and run SECRET="NODE0" P2P_PORT=5000 HTTP_PORT=3000 node app
-
open new tabs on terminal and run SECRET="NODE1" P2P_PORT=5001 HTTP_PORT=3001 PEERS=ws://localhost:5000 node app
-
open new tabs on terminal and run SECRET="NODE2" P2P_PORT=5002 HTTP_PORT=3002 PEERS=ws://localhost:5000,ws://localhost:5001 node app
-
open new tabs on terminal and run SECRET="NODE3" P2P_PORT=5003 HTTP_PORT=3003 PEERS=ws://localhost:5000,ws://localhost:5001,ws://localhost:5002 node app
-
open new tabs on terminal and run SECRET="NODE4" P2P_PORT=5004 HTTP_PORT=3004 PEERS=ws://localhost:5000,ws://localhost:5001,ws://localhost:5002,ws://localhost:5003 node app
-
Open firefox (with json Paser enabled)
-
write on url bar localhost:3000/blocks to see block chain from node0
-
step 9 can be done from other node also . To do this just change the port no to 3001,3002,3003,3004.
-
write on url bar localhost:3000/transactions to see transaction pool from node0
-
step 11 can be done from other node also . To do this just change the port no to 3001,3002,3003,3004.
-
Open postman
-
set type localhost:3000/transact in the ip bar and change the request type to post
-
Now go to the body section and select raw and then select JSON from drop down
-
in body write {"x":"your_mesage"} . "your_message" will the data of the transaction
-
now send the post request from postman
-
you will see the trasaction pool in postman window
-
now if you referesh the step 10 webaddress same transaction pool will be shown.
-
now continue 6 transcation . After every 6 transaction new block will be added to blockchain .
-
To see the updated blockchain refresh the page opened in step 9
-
now continue sending the post request from postman ans see how blocks are added in every 6 trnsaction.
-
Verify the last hash with next block current hash