The Mask Trading sidequest of Ocarina of Time is optional, but required if you want the Mask of Truth OR the Deku Nut or the Deku Stick capacity upgrade. The Mask of Truth allows you to read Gossip Stones, stones with the eye symbol on it.
How to complete the sidequest, by the way, is as follows.
After you give Zelda's letter to the soldier in front of the Death Mountain gate (in Kakariko Village), he will say that the Happy Mask Shop is open and his son wants a Keaton Mask. He will also say that you need to go to the shop, and also to the Bazaar (for the Hylian Shield, although you don't have to do this right now).
Get to the Happy Mask Shop in Hyrule Castle Town. Borrow the mask that looks like a yellow fox. Yes, yes, this is the Keaton Mask that the soldier was talking about. The salesman tells you sell the mask to someone for 15 rupees, then bring the rupees back to him.
Go back to the Death Mountain gate and sell the mask to the soldier. He will pay you 15 rupees for the mask.
NOTES: From now on, the soldier will wear the mask and will never take it off for the remainder of the game.