Encountering a " Warning: Couldn't broadcast tx with algod: HTTP 400 Bad Request: transaction "error when attempting to send a transaction using `goal clerk rawsend`

Hi team, I am not sure if here you can help me with this issue, but I don´t found the solution.

Issue: Encountering an “HTTP 400 Bad Request” error when attempting to send a transaction using goal clerk rawsend.

Context:

  • Original Algorand Account (Sender): N44XKK7V3AOCI6FMPCTVM3OITUQOHN2SIV3DEJZUVEFKABQXRICM63SCMA
  • Rekeyed Account (Current Authorization): GW7IF6VTXGU5LR3PWKT2O46IVY5OXWEJH6GOCPFRESDMTT2IWY4Y7VHUT4
  • Objective is to eliminate the rekey and restore control to the original account.
  • The account was rekeyed to another address, and the aim is to revert this rekey.

Steps Taken:

  1. Created a zero Algo transaction from the original account to itself, setting the --rekey-to flag to the original account’s address.
  2. Successfully signed the transaction using the private key associated with the original account.
  3. Attempting to send the signed transaction results in the error.

Error Message:

vbnetCopy code

goal clerk rawsend -f transaccion_firmada.txn
Warning: Couldn't broadcast tx with algod: HTTP 400 Bad Request: transaction {...} invalid: nonempty AuthAddr but rekeying is not supported

Details of the Signed Transaction (transaccion_firmada.txn):

  • Sender, Receiver, and Rekey-to Address: N44XKK7V3AOCI6FMPCTVM3OITUQOHN2SIV3DEJZUVEFKABQXRICM63SCMA
  • FirstValid (fv): 1471672
  • LastValid (lv): 1472672
  • Genesis ID: “mainnet-v1.0”
  • Fee: 1000 microAlgos
  • Type: “pay”
  • The transaction is a zero Algo payment meant to revert the rekey.

Additional Information:

  • The Algorand node being used for the transaction is up to date and synchronized.
  • The error persists despite the transaction being within the valid round range and being correctly signed.

Seeking:

  • An explanation for the “HTTP 400 Bad Request: AuthAddr but rekeying is not supported” error.
  • A solution to successfully revert the rekey operation and restore control to the original Algorand account.
2 Likes

Your original post says you’re using your old address in all three fields, but it should be:

Sender = account1 (has auth)
Receiver = account1 (has auth)
Rekey = account2 (new address to be given auth AKA your old address)

Docs:

  • Sender: This is the address of the account that you want to rekey. This account must have enough balance to pay for the transaction fee.

  • Receiver: This is typically set to the sender’s address. This is because the purpose of the transaction is not to transfer funds, but to change the spending key of the sender’s account.

  • Rekey-to: This is the address that you want to change the spending key to. After the transaction is confirmed, this address’s private key will be the new spending key for the sender’s account.

const rekeyTxn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
 from: acct1.addr,
 to: acct1.addr,
 amount: 0,
 suggestedParams,
 rekeyTo: acct2.addr, // set the rekeyTo field to the new signer
});

Thanks for your quick response, I solved the issue using phyton insted of goal, but now I have the following:

algod_request
raise error.AlgodHTTPError(e, code)
algosdk.error.AlgodHTTPError: TransactionPool.Remember: transaction LBOWIYOKURZGZ7H7CKUIF6FLJ34LMNPUYXAQOKJATZXLRT6UHUVA: should have been authorized by GW7IF6VTXGU5LR3PWKT2O46IVY5OXWEJH6GOCPFRESDMTT2IWY4Y7VHUT4 but was actually authorized by N44XKK7V3AOCI6FMPCTVM3OITUQOHN2SIV3DEJZUVEFKABQXRICM63SCMA

The problem is that I only have the Prase from the original acc, and not for the rekey account. But I didn´t the rekey, I think it was in the MyAlgo hack a few months, ago. Then:
If I has only the prase to import the original account, I never will manage my wallet again, right? all my assest were lost
:frowning: