feat: customizable gas markets (with EIP-1559 default), base fee oscillation, premium distribution#1173
Merged
feat: customizable gas markets (with EIP-1559 default), base fee oscillation, premium distribution#1173
Conversation
Co-authored-by: Eric Tu <6364934+ec2@users.noreply.github.com> Co-authored-by: Mikers <snissn@gmail.com> Co-authored-by: raulk <raul@protocol.ai> Co-authored-by: Shashank Trivedi <100513286+lordshashank@users.noreply.github.com>
…pc into simple-genesis
Co-authored-by: Karel Moravec <moravec.wdd@gmail.com>
Co-authored-by: Karel Moravec <moravec.wdd@gmail.com>
…pc into simple-genesis
Co-authored-by: raulk <raul@protocol.ai>
... so that wasm32 actors are scanned from actors/Cargo.toml.
Make read_only_view take an optional height (required for prepare and process proposal).
begin_block always takes a block producer pubkey.
create FvmExecState#finalize_gas_market.
make BlockGasTracker#read_gas_market public return full Reading BlockGasTracker#commit_utilization take premium recipient in BlockGasTracker#distribute_premiums
cryptoAtwill
approved these changes
Oct 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates these draft and partial PRs into a fully reviewed solution.
New features
Gas markets in actor space
CurrentReadingandUpdateUtilization.SetConstantsmethod. By default this requires a system caller, thus limiting execution to migrations only. But users can override the caller requirement to something different to allow updates from authorized actors/accounts.Premium distributions
Gas premiums previously collected under the Reward actor sitting at address f02 are now distributed to the block producer, crediting them to an f410/0x address derived from their secp256k1 public key.
Base fee oscillation
The base fee now oscillates based on gas utilization, as determined by the gas market implementation.
Block gas limit updates
Whenever the block gas limit is updated in the gas market actor, we inform the consensus layer during
end_blockso CometBFT begins to pack blocks adhering to the new block gas limit.Message selection
We introduced an incipient message selection function, which users could override by patching the codebase. In the future, we intend to make this modular/pluggable.
Review
Many adjustments were done directly on the branch throughout review. I tried to atomize the changelog as separate commits, but this was done post-facto so the diffs aren't too clean. The first review commit is 040e18e.
TODO
Closes #925