What was the most important effect of gunpowder in ancient China?

It provided a military advantage.
It was used to create fireworks displays.
It was used in the construction of canals.
It demonstrated scientific knowledge to rivals.