stacks-subnets icon indicating copy to clipboard operation
stacks-subnets copied to clipboard

Fix fee estimation

Open obycode opened this issue 2 years ago • 1 comments

Looks like the fee estimate request is missing a parameter:

docker-stacks-subnet-1      | WARN [1675965917.585120] [testnet/stacks-node/src/burnchains/commitment.rs:151] [relayer] Failure getting response from L1 on recommended fee rate: reqwest::Error { kind: Decode, source: Error("missing field `estimated_cost`", line: 1, column: 152) }
docker-stacks-subnet-1      | ERRO [1675965917.588488] [testnet/stacks-node/src/burnchains/commitment.rs:570] [relayer] Failed to get L1 fee estimate: L1ResponseFailure

obycode avatar Feb 09 '23 18:02 obycode

This error is a bit misleading. The request is fine, but the response is getting a 400 error, and so the response is not the expected type. Converting the response json to a RPCFeeEstimateResponse is what is causing this error.

The appropriate change is just to change this from an error to a warning (or less), since it is expected to see a 400 error from this endpoint before the node is able to estimate the cost.

obycode avatar Feb 21 '23 15:02 obycode