Treasurer Jim Chalmers has shared new details about the shaping of the federal budget, and how it changed in the wake of the Iran war.