Collaborative Learning for Cyberattack Detection in Blockchain Networks