How any country knows who is behind cyberattacks is above my pay grade but I assume all of the major players with such capabilities would know where such an attack emanated from. The nature of such an attack might dictate the response. Damaging the grid in a manner that we knew it wasn’t coming back in any timeframe that mattered would be something very different than a short term takeover such as recently happened to Turkey. Perhaps more importantly is who the President is at that time. Not a very reassuring thought currently.