-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update LimitSimulationGasDecorator with custom Gas Meter Setter #45
Conversation
@@ -91,15 +91,15 @@ func TestGasCostOnQuery(t *testing.T) { | |||
Depth: 1, | |||
Work: 50, | |||
}, | |||
expectedGas: 2*GasWork50 + GasReturnHashed, | |||
expectedGas: 2*GasWork50 + GasReturnHashed + 1, |
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.
Verifying this update
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.
do you mind shedding light as to why we expect 1 extra gas here?
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.
Fyi @philipsu522 @udpatil this feels like it may be unrelated to this PR and possible rounding issues. Check this comment from before: https://github.com/sei-protocol/sei-wasmd/blob/UpdateLimitSimulationGasDecorator/x/wasm/keeper/recurse_test.go#L248
}, | ||
"recursion 4, some work": { | ||
gasLimit: 400_000, | ||
msg: Recurse{ | ||
Depth: 4, | ||
Work: 50, | ||
}, | ||
expectedGas: 5*GasWork50 + 4*GasReturnHashed, | ||
expectedGas: 5*GasWork50 + 4*GasReturnHashed + 1, |
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.
Verifying this update
@@ -91,15 +91,15 @@ func TestGasCostOnQuery(t *testing.T) { | |||
Depth: 1, | |||
Work: 50, | |||
}, | |||
expectedGas: 2*GasWork50 + GasReturnHashed, | |||
expectedGas: 2*GasWork50 + GasReturnHashed + 1, |
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.
do you mind shedding light as to why we expect 1 extra gas here?
Corresponding sei-chain PR: sei-protocol/sei-chain#1546
TESTING