You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Thanks for pointing that out! You're right that the first Bridge node will need to request from a consensus node. Maybe we can add a trusted_height configuration, so we can identify the starting block with both a height and a hash. This could simplify things while keeping the CometBFT interaction efficient.
I see this as a configuration issue. We can determine if trusted_hash is the genesis block by comparing it with a hardcoded constant. If it matches, we can request block 1 directly. Otherwise, we can request the data from the network. This solution simplifies the start of new networks while also eliminating the need for additional APIs or proxy methods.
Adding the Get operation to the RPC is certainly an option, and it could address the issue directly. However, introducing this new operation might increase complexity on the celestia-app side and still require additional proxying, which is unnecessary and can be handled within node logic with a single if statement.
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.
The text was updated successfully, but these errors were encountered: