Data Synchronization Between HyperGrid and Solana Base Layer
Step-by-step flow of reading data from and synchronizing updates to the Solana Base Layer within the HyperGrid architecture.
Last updated
Step-by-step flow of reading data from and synchronizing updates to the Solana Base Layer within the HyperGrid architecture.
Last updated
The diagram above illustrates the following flow when performing state synchonization from Solana to a Grid on HyperGrid, like Sonic.
Initial loading: A pre-existing Solana program is loaded from Storage into HyperGrid's Cache.
User sends a read request for a specific program to HyperGrid's Sonic RPC.
Synchronization Program checks the Cache for the requested Program, but it's not found.
Synchronization Program sends a request to Solana Base Layer RPC for the Program.
Solana Base Layer responds with the Program data.
Synchronization Program receives the response and updates HyperGrid's Cache with the new Program data.
Synchronization Program sends the read response back to Sonic RPC.
Sonic RPC forwards the read response to the User.
The diagram above illustrates the following flow when performing state synchonization from a Grid on HyperGrid [like Sonic], back to Solana.
Initial loading: A pre-existing Program is loaded from Storage into HyperGrid's Cache.
User sends a write request for a specific Program to HyperGrid's Sonic RPC.
Synchronization Program checks the Cache for the requested Program, but it's not found.
Synchronization Program sends a request to lock the program on the Solana Base Layer.
Solana Base Layer RPC locks the requested Program.
Solana Base Layer responds with the Program data.
Synchronization program receives the response and updates HyperGrid's Cache with the new program data.
Synchronization Program sends a request to release the lock and write the updated data for the Program to the Solana Base Layer.
Solana Base Layer RPC releases the lock and writes the updated data.
Synchronization Program sends the write response back to Sonic RPC.
Sonic RPC forwards the write response to the User.