Where does the practice of a state 'declaring war' originate?

by [deleted]
[deleted]

It as least as old as Rome. An account of the Roman declaration of war can be found here.

This sort of formal declaration is considered one of the origins of modern ideas of "just" war.

That said, remember to read Livy critically - he has an agenda to make the glorious past look especially glorious.