Migrating Solana from v1 to v2

How to upgrade from Solana API v1 to v2 and access new features and better performance.