hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
336 stars 370 forks source link

Reduce WARN logs verbosity for non EIP-1559 chains #2233

Open serejke opened 1 year ago

serejke commented 1 year ago

We're running on Axon EVM chain, which has not fully supported EIP-1559.

Hyperlane relayer does ignore (HTTP/parsing) errors caused by unsupported EIP-1559 eth_feeHistory: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/1722f4ee7e38f292dfe39d7d522934b0b800b280/rust/chains/hyperlane-ethereum/src/mailbox.rs#L228

but the relayer's logs still report benign WARN errors:

there are 2 invocations of eth_feeHistory:

first, when the serial_submitter estimated the fee: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/b56b022f8875410090a7a9ed8543e1bbe1d2ed1c/rust/agents/relayer/src/msg/serial_submitter.rs#L245

second, when the serial_submitter sends the message: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/b56b022f8875410090a7a9ed8543e1bbe1d2ed1c/rust/agents/relayer/src/msg/serial_submitter.rs#L287 internally it calls process_contract_call that again calls estimate_eip1559_fees:

In both cases a log similar to the following is recorded:

{"timestamp":"2023-05-11T13:50:45.033087Z","level":"WARN","fields":{"message":"Non-retryable JsonRpcError in http provider","error":"(code: -32602, message: invalid type: integer 10, expected a (both 0x-prefixed or not) hex string with length between (0; 64] at line 1 column 2, data: None)"},"target":"hyperlane_ethereum::rpc_clients"

It would be clearer if relayer ignores non EIP-1559 failures and does not log WARN, or logs "non-EIP1559" INFO along with another gas estimation log. Also there is no need to retry 5 times in request_with_retry when there is a parsing error.

tkporter commented 8 months ago

Noting we get this with Celo very frequently as well