-
Notifications
You must be signed in to change notification settings - Fork 235
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
refactor: estimate gas and fee #9889
Conversation
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
const feeFromEstimatedGas = getFeeFromEstimatedGas(estimatedGas); | ||
|
||
// The actual fee should be under the estimate, but not too much | ||
// TODO(palla/gas): 3x is too much, find out why we cannot bring this down to 2x |
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.
It was too much because gasLimits included teardown gas, and getFeeFromEstimatedGas
doubled the cost for teardown.
@@ -106,6 +105,7 @@ impl PublicBaseRollupInputs { | |||
end, | |||
start_state, | |||
revert_code, | |||
gas_used: Gas::empty(), // gas_used is not used in rollup circuits. |
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.
This unnecessary empty gas will go away after we deprecate public kernel tail.
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.
Nice! 🚀
inclusion_fee
inGasSettings
: it's included in tx overhead.