celestiaorg / celestiaorg/celestia-node
refactor(core/exchange): suggestion: Rework core-exchange Get() Method
- Dominant language
- Go
- Stars
- 996
- Forks
- 1.1k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 34
Description
### Implementation ideas
I've reviewed the usage of the Get() method in core-exchange and identified that its primary usage is for subjective initialization. It's employed when launching a bridge node with a specified trusted hash, from which it begins syncing headers.
The current implementation of Get() appears overly complex, relying on multiple Core RPC methods to fetch blocks and construct EDS and headers. Additionally, one of the RPC methods used isn't available in the CometBFT gRPC service, necessitating proxying if we migrate to gRPC.
Instead of utilizing CometBFT RPC to obtain EDS and headers, we could request this data from the network using the hash. This would simplify the logic within core-exchange, reduce dependence on CometBFT endpoints, and eliminate the need to introduce new proxy methods in celestia-app.
Contributor guide
Assessment
This issue has not been assessed yet.