Towards trusted data on decentralized IoT applications: Integrating blockchain in constrained devices