-
Notifications
You must be signed in to change notification settings - Fork 365
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
fix(contracts): remove ExceededMaxRespondFee
error
#1407
fix(contracts): remove ExceededMaxRespondFee
error
#1407
Conversation
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
@@ -51,6 +51,16 @@ func BytesToQuorumThresholdPercentages(quorumThresholdPercentagesBytes []byte) e | |||
return quorumThresholdPercentages | |||
} | |||
|
|||
func WeiToEth(wei *big.Int) float64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is only used for metrics, can't the conversion be handled on the visualization side of those metrics?
This should also not be used for any other purpose other than metrics and logs, because this is a lossy conversion (floats are not good for handling money because of that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, why don't we keep the big.Float? That might be lossless (but I'd need to check the docs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would be better to handle the conversion from grafana. I'll see if it is possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Oppen I agree no one likes floats, but Prometheus' Gauge accepts only float64 type
Description
Removes
ExceededMaxRespondFee
error inAlignedLayerServiceManager
:ExceededMaxRespondFee
is removed from the Aligned contract and now the aggregator wallet will pay for the difference and the batcher will pay for thefeeLimit
he set. This case happens when the tx cost is higher than therespondToTaskFeeLimit
.respondToTask
in the aggregator will return a permanent error if and only if either the aggregator or the batcher doesn't have enough funds in their wallets.Testing
batch.RespondToTaskFeeLimit
:batch.RespondToTaskFeeLimit
:Get Agg balance before tx:
Get batcher balance before transaction:
(Remember Batcher sends some funds when submitting task! so you must check the funds between the task submittion and the response)
cast call 0x851356ae760d987E095750cCeb3bC6014560891C "balanceOf(address)(uint256)" 0x7bc06c482dead17c0e297afbc32f6e63d3846650
batch.RespondToTaskFeeLimit
. You can identify theRespondToTaskFeeLimit
value from the aggregator logs.Another test:
RespondToTask
reverts.Type of change
Checklist
testnet
, everything else tostaging