An event-based resilient consensus algorithm for secure and low-carbon operation of cyber-physical smart grids | Synapse