They are on the surface of a lot of the wood in the attic.
What is it and what is causing this?
"it's sap crystals that have been extruded from the wood due to high attic temperatures. We see more of this sap staining when the wood used for framing was not kiln dried before construction." Inspectapedia
Sap in painted wood will cause staining but it is ok in the attic.