Skip to content
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 excessBlobGas and BlobBaseFee to fix simulate evmcontext #1782

Merged
merged 7 commits into from
Jul 29, 2024

Conversation

udpatil
Copy link
Collaborator

@udpatil udpatil commented Jul 24, 2024

Describe your changes and provide context

This modifies the EVM context created in keeper to use 1 as the blob base fee and also updates the evmrpc simulate getHeader to return 0 for excess blob gas so that trace block involving the blobbasefee opcode doesn't fail.

Testing performed to validate your change

Added hardhat test to verify opcode succeeds

BaseFee: b.keeper.GetBaseFeePerGas(b.ctxProvider(LatestCtxHeight)).BigInt(),
GasLimit: b.config.GasCap,
Time: uint64(time.Now().Unix()),
ExcessBlobGas: &zeroExcessBlobGas,

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.87%. Comparing base (42a2964) to head (00c5e93).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1782      +/-   ##
==========================================
+ Coverage   60.85%   60.87%   +0.02%     
==========================================
  Files         257      257              
  Lines       22488    22490       +2     
==========================================
+ Hits        13684    13690       +6     
+ Misses       7839     7835       -4     
  Partials      965      965              
Files Coverage Δ
evmrpc/simulate.go 64.78% <100.00%> (+0.24%) ⬆️
x/evm/keeper/keeper.go 48.55% <100.00%> (ø)

... and 3 files with indirect coverage changes

@udpatil udpatil force-pushed the fix-simulate-context branch from 403ed98 to 60d97a5 Compare July 25, 2024 04:14
@udpatil udpatil merged commit 9355f52 into main Jul 29, 2024
48 checks passed
@udpatil udpatil deleted the fix-simulate-context branch July 29, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants