Falcon Architecture
There are 5 main components
-
BandChain Client
- Provide query client for retrieving tunnel information and packet information.
-
Chain Provider
- Abstract level of keys management
- Manages key operations such as adding, deleting, listing related keys.
- Transaction Creation
- Constructs calldata for packet relaying.
- Dynamically calculates gas fees for both EIP-1559 and Legacy transactions.
- Transaction Execution
- Broadcasts transactions to the blockchain.
- Verifies transaction success with a receipt check.
- Abstract level of keys management
-
Scheduler
- Execute tasks for each tunnel relayer periodically.
- Synchronize with BandChain periodically to fetch new tunnel (if it is in all-tss-tunnel mode).
-
Tunnel Relayer
- Fetche tunnel information and packet by BandChain Client and chain provider
- Handle the packet relaying process
- Validate tunnel state (e.g., active status, latest sequence).
- Fetche unrelayed packets from BandChain client.
- Submit packet to chain provider to continue on transaction process.
-
Wallet
- Manage keys store.
- Signs transactions using keys from the senders pool.
⚙️ How It Works
- Connect to BandChain: Falcon connects to the BandChain to poll a new data from tss tunnel.
- Connect to Destination Chain: Falcon connects to the destination chain to retrieve current state and packet sequence of the target contract associated with the TSS tunnel.
- Retrieve Data: Falcon fetches the next-sequence packet required by the target contract from BandChain.
- Contract Interaction: Using a pre-configured RPC endpoint and wallet key, Falcon submits a transaction containing the relevant data to the target smart contract.
- Retry & Logging: Falcon supports automatic retries on failure and logs all relayed events for traceability.