xmtpd icon indicating copy to clipboard operation
xmtpd copied to clipboard

Error leaks to client: replacement transaction underpriced

Open mkysel opened this issue 11 months ago • 2 comments

When creating many MLS commits using XDBG such as cargo xdbg -b local -d generate --entity identity --amount 5, some of these might fail because of wrong pricing.

Some of these errors should not flow back to the client and should be retried by the payer.

Error: 
   0: API error: API client error: mls error: status: Internal, message: "error publishing group message: rpc error: code = Internal desc = error publishing identity update: replacement transaction underpriced", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }
   1: API client error: mls error: status: Internal, message: "error publishing group message: rpc error: code = Internal desc = error publishing identity update: replacement transaction underpriced", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }
   2: mls error: status: Internal, message: "error publishing group message: rpc error: code = Internal desc = error publishing identity update: replacement transaction underpriced", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }
   3: status: Internal, message: "error publishing group message: rpc error: code = Internal desc = error publishing identity update: replacement transaction underpriced", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }

mkysel avatar Jan 13 '25 19:01 mkysel

@fbac could I get a technical explanation of this one?

Is the fix as simple as retrying the transaction?

mkysel avatar Jan 16 '25 20:01 mkysel

@fbac could I get a technical explanation of this one?

Is the fix as simple as retrying the transaction?

@mkysel a transaction in the mempool (not executed) can be replaced with other with the same nonce, but has to have a higher fee, so the miner takes it over the preceding one.

Without any context, I believe what happened here is that some transaction was posted to the blockchain. Before it was executed a new one was posted, with same nonce, same gas fees, and same private key originating it.

fbac avatar Jan 17 '25 13:01 fbac

Closing this as complete as it's fixed now. The fix is a combination of factors such as enhancing the nonce manager, fixing the blockchain path, better blockchain methods, etc

fbac avatar Aug 22 '25 12:08 fbac