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

Operator registration with fireblocks goes infinite loop because trying to convert the fireblocks transaction id (uuid) to hex #422

Open
induwarabas opened this issue Jan 6, 2025 · 0 comments · May be fixed by #423
Labels
bug Something isn't working

Comments

@induwarabas
Copy link

Describe the bug

func (m *SimpleTxManager) send(ctx context.Context, tx *types.Transaction) (*types.Receipt, error) {
	m.logger.Debug("Estimating gas and nonce")
	tx, err := m.estimateGasAndNonce(ctx, tx)
	if err != nil {
		return nil, err
	}
	bumpedGasTx := &types.DynamicFeeTx{
		To:        tx.To(),
		Nonce:     tx.Nonce(),
		GasFeeCap: tx.GasFeeCap(),
		GasTipCap: tx.GasTipCap(),
		Gas:       uint64(float64(tx.Gas()) * m.gasLimitMultiplier),
		Value:     tx.Value(),
		Data:      tx.Data(),
	}

        // When the wallet is fireblocks wallet, it returns uuid as the txID.
	txID, err := m.wallet.SendTransaction(ctx, types.NewTx(bumpedGasTx))
	if err != nil {
		return nil, errors.Join(errors.New("send: failed to estimate gas and nonce"), err)
	}
	return &types.Receipt{
                 // TxHash become an invalid hex because converting UUID to hex. 
                 // Then the wait for receipt will be called with invalid txID and run in infinite loop
		TxHash: common.HexToHash(txID),
	}, nil
}

The fireblocks wallet returns UUID instead of hex when call SendTransaction. After that it is trying to convert hash assuming it is a hex. Then the converted invalid value pass for querying receipt. It creates an infinite loop.

To Reproduce
Register operator with EigenLayer using fireblocks

Expected behavior
Registration complete successfully

OS details

@induwarabas induwarabas added the bug Something isn't working label Jan 6, 2025
induwarabas pushed a commit to induwarabas/eigensdk-go that referenced this issue Jan 6, 2025
Introduce `isTxIdHex` to handle tx ID formats in transaction receipt retrieval. Updated relevant function signatures and logic to support this flag and added necessary changes across dependent tests and usages.
induwarabas added a commit to induwarabas/eigensdk-go that referenced this issue Jan 6, 2025
Introduce `isTxIdHex` to handle tx ID formats in transaction receipt retrieval. Updated relevant function signatures and logic to support this flag and added necessary changes across dependent tests and usages.
induwarabas added a commit to induwarabas/eigensdk-go that referenced this issue Jan 6, 2025
…n wallets

This change introduces an IsHexTxID method to the Wallet interface, with implementations for privateKeyWallet, fireblocksWallet, and MockWallet. The method is used to handle differing TxID formats (hexadecimal or custom) when processing transaction receipts. Adjustments were made to the SimpleTxManager to incorporate this new method for better compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant