Whether it's sustainable it's too much of a crystal ball, IMHO. Russia's military/war budget fraction (of the budget) has doubled compared to the prewar, according to some Western analyses, (ibid).
Russia has managed to bypass many (perhaps most) Western sanctions over time, so their income hasn't changed that much. To be slightly more precise on this, their fossil fuel income has been lower than in 2022, but that in itself was an exceptional year of high income. So, the oil price cap that was imposed early in late 2022 did affect them some, but income was pretty much the same as in 2021 (or 2018).
Most recently however, they substantially bypassed the oil price cap, by creating their own "shadow/dark fleet". You can pretty much see waning effect of the cap in this graph.
The US at least has responded with secondary sanctions on middle-men in the UAE etc., but this growing economic war is hard to predict how it will end.
According to WaPo
But Russia’s most important help comes from China. Two-way trade between the countries last year topped $240 billion, a record high, up from $147 billion before the war, according to Chinese customs data. [...] But the Russians are not getting any bargains. Compared with the first half of 2021, Russian customers last year paid 78 percent more for Chinese products such as machine tools while other customers paid 12 percent higher prices, the Bank of Finland said.
The key to Russia’s surprising economic endurance has been large sums of defense spending, what some economists call “military Keynesianism,” in a nod to British economist John Maynard Keynes’s support for using public spending to lift growth.
As the war in Ukraine rages, Russia’s defense spending this year is expected to consume 28 percent of the government budget, according to the Bank of Finland. That’s more than twice the share of government spending that the United States devotes to the military. [...]
This month, Putin said more than 520,000 weapons plant jobs were created in the past 18 months. Unemployment in Russia is at a record low.
Basic economics says that that will put some pressure on inflation, and we're some signs of that (typical of war economies)
Inflation jumped last year above 7 percent, causing the central bank to hike its main interest rate to 16 percent to cool off demand.
And long term that's expected to degrade the living standards because tanks and shells don't contribute to that. But whether that will happen anytime soon... the USSR lasted for a long time. And in North Korea almost nothing changed. (And they do spend about 1/3 of the GNP, not just of their budget, on the military.)
As for this year (2024):
the budget remains more classified than any previous one: the share of expenditures that are classified will be just under 27 percent in 2024, compared to about 19 percent in 2022 and 15 percent in 2021 [...]
To cover the increased military expenses laid out in the bill, Russia’s Federal Treasury will have to take in 35 trillion rubles (about $395 billion) in revenue — 22 percent more than it received in 2023.
The sources for that extra income are not entirely clear. There's discussion of raising corporate taxes for instance. Putin invited a circle of businessmen (Russian Union of Industrialists and Entrepreneurs) to discuss the situation. Officially though
Anton Siluanov explained that the funding will come from the introduction of export duties, the improvement of indirect tax collection processes, and an increase in excise taxes on tobacco and wine.
VAT collection though is already at 95% efficiency, according to another source in that piece. (Can be confirmed from another source, table 2.)
Somewhat aside, but since this has been discussed in relation to globalization in some comments... The war was apparently good (so far) for the Tajik economy too, via remittances from migrant workers.
Migrants from the former Soviet Union’s Central Asian states — Tajikistan, Uzbekistan, Kyrgyzstan, Turkmenistan and Kazakhstan — have traditionally been a valuable source of cheap labour in Russia. [...]
The European Bank for Reconstruction and Development forecast in September 2023 that economic growth in Central Asia would hit 5.9% in 2024, with remittances playing a role. Tajikistan was expected to see the biggest GDP growth in the region, reaching 7.5% in 2023 and 2024, the report said, thanks in part to “the inflow of remittances from Russia.”