ounce messages and selects the best candidate to listen to. The actual comparison of who is better is performed using a comparison process called the Best Master Clock Algorithm, which differs slightly between PTP profiles but always with the intention of select- ing what will ultimately be the most accurate source of time. Likewise, each master candi- date itself can see the Announce messages from other candidates, and if there is a better option out there, a given candidate will enter a passive state where they do not become Grandmaster since another node could do a better job. The details of all of these selection processes are handled by a standardized state machine in each node and therefore every node ultimately reaches the same decisions. Fig. 8-15 illustrates this selection process. This whole selection process is dynamic and continues to run after the initial selection. This means that if a better potential master suddenly appears on the network, then it can take over as the Grandmaster role, and likewise, if the current master disappears for any rea- son or loses its accuracy (e.g., as the result of GNSS jamming attack affecting it), then a 282 Open Radio Access Network (O-RAN) Systems Architecture and Design better candidate that's been lurking in the background can step up and take the Grandmaster role. It is this master selection mechanism that allows PTP to provide robust synchronization. Once everyone is agreed on whom the Grandmaster is going to be, which in turn deter- mines how PTP will flow through any boundary clocks, the nodes can actually start synchro- nization-as in alignment with their local clocks and tick rate to that of the Grandmaster. This is a two-stage process and involves repetitive messages exchanges as shown in Fig. 8-16 to initially syntonize the slave's clock-make it tick at the right rate-and then syn- chronize it-make it tell the correct time. Grandmaster Grandmaster [2] is excluded because it lost GNSS input [3] is chosen over [1] as it is "nearer" (fewer BCs away) Grandmas