-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
There are currently two main ways to know the current height of your Kyoto node:
- You see the logs go by and pick up the highest number from the output
- After applying an update to your wallet, you call
Wallet::latest_checkpoint
Both of these feel like workarounds for getting what you need and are probably suboptimal, for different reasons:
- Using logs for querying state feels like an anti-pattern. It requires ensuring logs are never missed, and users must then maintain their own internal view of the node's likely latest block rather than being able to query it directly.
- Querying the LocalChain on the wallet is likely more ergonomic, but this approach breaks down if the user is leveraging more than a single Kyoto client to sync their wallet. If this happens, the user then cannot trust the latest checkpoint on the Wallet type to represent the best block known by the Kyoto node. I suspect this could definitely be the case because of the ability for Esplora/Electrum clients to pick up mempool information, leading to software potentially offering a dual-client approach where users can also query an Electrum server for syncing requirements.
Adding a Client::best_block method would be a simple, direct solution to the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels