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

indexer-agent: fix gas price in tx management logs #392

Closed
wants to merge 1 commit into from

Conversation

chriswessels
Copy link
Member

@chriswessels chriswessels commented Mar 17, 2022

Fixes BigNumber logs like this:

{"level":30,"time":1647523071123,"pid":1,"hostname":"99c572502af3","name":"IndexerAgent","component":"Network","indexer":"0x365507a4eEF5341cF00340F702F7f6E74217d96e","operator":"0x0EBAB0EB90E97DD211Aa5D4fb19E7048ae4aa4e5","allocation":"0x1B6551918c4175eCB82bA1191857ad5D4C751E27","deployment":{"bytes32":"0x45a6851c2f977fc91a390eb6f4c67a035296581244bc83cf8b74c5371f438436","ipfsHash":"QmT2Y7SHXGRt7EKXzFPYMjnrgX64PQr86EjbsHoDLNzwLy"},"createdAtEpoch":438,"poi":"0x53b8688603062200577d77eb5af515bf346b709d0d5dee11860cff936e5120c4","createdAtBlockHash":"0x7d6fcb374cafbe4c9fa30ac7cfe50a38c91fb68667e82f6b4182ebbc94bef6fc","action":"close","maxBaseFeePerGas":100000000000,"baseFeePerGas":{"type":"BigNumber","hex":"0x357dea1405"},"priceEstimateAttempt":6,"msg":"Base gas fee per gas estimation still above max threshold"}

@chriswessels chriswessels added bug Something isn't working indexer-agent labels Mar 17, 2022
Copy link
Contributor

@hopeyen hopeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore this sorry 🙏

@chriswessels chriswessels marked this pull request as draft March 17, 2022 20:12
@hopeyen hopeyen requested review from hopeyen and removed request for hopeyen March 17, 2022 20:18
logger.warning(
`Max gas price has been reached, waiting until gas price estimates fall below to resume transaction execution.`,
{
baseFeePerGasMax: this.baseFeePerGasMax,
currentGasPriceEstimate: feeData.gasPrice,
currentGasPriceEstimate: feeData.gasPrice.toNumber(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you need a non-null assertion here, so it would be feeData.gasPrice!.toNumber()

},
)
} else {
logger.info(`Gas price estimation still above max threshold`, {
baseFeePerGasMax: this.baseFeePerGasMax,
currentGasPriceEstimate: feeData.gasPrice,
currentGasPriceEstimate: feeData.gasPrice.toNumber(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well.

@fordN
Copy link
Contributor

fordN commented Jul 12, 2024

@chriswessels been about 2 years here in review 😬. I'm going to just pick this one up and finish it.

@fordN
Copy link
Contributor

fordN commented Jul 12, 2024

Closing in favor of #954

@fordN fordN closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working indexer-agent
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants