Russia's state finances have been strained by the costs of the war and pressure on its vital energy exports.