OPTCHAIN: AN ADVANCED OPTIMIZATION METHOD FOR ENHANCING IOT DATA SECURITY VIA BLOCKCHAIN (Computer Science (AGH University), 2025)