Architecture
Query lifecycle from data request to retrieval
Last updated
Query lifecycle from data request to retrieval
Last updated
In Futaba, Relayer and Konoha (Oracle) are the off-chain components and they receive the Src (Source) chain requests. Relayer then retrieves the storage proof from each chain, and Konoha retrieves the block headers and returns them to the Src chain for validation.
Phase 1: request query
Call the endpoint to request a Gateway Contract query from the user contract
Gateway Contract emits events related to query requests to Relayer
An event about the query of the block header is emitted from Light Client Contract to Konoha (Oracle)
Phase 2: off-chain agents work
Konoha receives the event and gets the block header (state root) for a specific block height in the destination chain
Return and save state root to Light Client Contract
Relayer work
Relayer receives the event and obtains the account proof and storage proof of the target data
Return the proof to the Gateway Contract in the src chain (at this time, the state root must have been saved first)
Phase 3: verify and return data to the user
Light Client Contract to verify account proof and storage proof
The store received data as a cache
If verification is successful, data is returned to User Contract