Blockchain for IOT and IIoT