-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rework gas parameters in Broadcaster #1255
Comments
I think solution A is a pain to maintain for validators. Solution B, I think is better. Another way is to put the checkpoint signing to a separate consensus channel like topdown. Personally I feel the way bottom up signature aggregation on chain is perhaps the easiest to maintain. I think the added benefit of solution B is that it can be used for topdown as well. Just the handling of the effects are different. |
I believe an ideal approach is a hybrid of Solutions A and B. First, we would expose a gas_fee_cap and gas_premium estimation via an ABCI query—precisely the kind of function it was designed for. The Broadcaster would then use these estimates to ensure the transaction is priced for timely inclusion. Although validators would still need to front the usual fees, once a transaction is successfully included, the system could provide a full or partial refund specifically for this transaction type. As a result, honest validators must maintain some balance upfront but wouldn’t need to constantly check or replenish it, because the refund mechanism would keep their overall funds intact. |
@karlem I don't quite understand the value of imposing the need to calculate proper gas fee values (gas fee cap and gas premium), when in the happy path they will never actually be used. Seems a bit wasteful to do that work and to introduce yet another moving part (as @cryptoAtwill points out), when it'll only be used in the uncommon error path. I tend to concur with @cryptoAtwill that we might as well introduce conditional charging at this point, since @sanderpick also wants modularity at the gas charging level. To avoid having to deal with dynamic values, we can:
|
@cryptoAtwill Here's a potential work plan.
|
Cool, this sounds good to me. Related, the system level transactions can limit tx throughput because they use the entire block gas limit. If we're going to fork ref-fvm, is there an opportunity to somehow treat these differently? ie, just make the gas limit on the message the exact amount of gas used? Or maybe this would be possible by implementing a custom |
I have been investigating the test failures in #1239.
The latest failure was caused by checkpoints not being signed by validators and not reaching quorum. The root cause was that the
Broadcaster
component (which validators use to dispatch signatures on-chain) was using staticgas_fee_cap
andgas_premium
values configured inconfig.toml
. By default, these values are 0.Since we no longer accept a
gas_fee_cap
below the minimum base fee, we were correctly rejecting these signature attempts. Therefore the checkpoint remained devoid of quorum leading to a timeout in the test.Potential solutions
Solution A: Auto-adjust gas parameters.
Solution B: Exempt these messages from gas costs.
The text was updated successfully, but these errors were encountered: