Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finality Provider Registration Fails When Full Node's Indexer is Disabled #279

Open
Errorist79 opened this issue Jan 11, 2025 · 1 comment

Comments

@Errorist79
Copy link

Description

When attempting to register a finality provider with indexing disabled on the Babylon node, the registration process encounters an issue. While the transaction is successfully submitted to the chain, the finality provider instance fails to start properly.

Current Behavior

  1. When executing fpd create-finality-provider ... with indexer disabled:

    • Initial registration attempt fails with error:
    error: Failed to wait for block inclusion: cannot determine success/failure of tx because transaction indexing is disabled on rpc url
    
    • The transaction is actually successful on-chain
    • Local database is not updated with the finality provider information
    • Finality provider instance does not start (--eots-pk <pk_address>)
  2. Re-running the same command:

    • System detects the finality provider is already registered on chain
    • Local database is updated
    • Finality provider instance starts successfully

Expected Behavior

The registration should succeed on the first attempt, even with indexing disabled:

  1. Transaction should be submitted
  2. System should verify registration by querying the chain directly
  3. Local database should be updated
  4. Finality provider instance should start automatically

Technical Details

It seems the issue occurs in the CreateFinalityProvider function:

https://github.com/babylonlabs-io/finality-provider/blob/main/finality-provider/service/app.go#L396-L436

The current implementation relies on transaction indexing to verify registration success. However, the system already has functionality to query finality provider status directly from the chain, which could be used as a fallback mechanism when indexing is disabled.

Impact

  • poor UX requiring repeat command execution
  • confusion about registration status
  • Unnecessary delay in finality provider activation

Suggested Solution

Implement retry mechanism with direct gRPC queries when transaction indexing is disabled:

  1. Submit registration transaction
  2. If indexer error occurs, implement retry logic to query the chain directly
  3. Once confirmed on chain, update local database and start the instance
@gitferry
Copy link
Member

Hey @Errorist79, this is a valid issue which is rooted in cosmos/relayer implementation for babylon client with the issue. For fp to work properly, the babylon rpc node has to enable tx indexing. There are some other functions like AddFinalitySig and CommitPubRand that rely on tx indexing. I think your proposal works but it will (1) increase complexity due to addition retry logic, and (2) introduce many extra rpc calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants