-
Notifications
You must be signed in to change notification settings - Fork 189
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
RPC update - add l2 gas #2335
RPC update - add l2 gas #2335
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2335 +/- ##
==========================================
+ Coverage 74.65% 74.88% +0.22%
==========================================
Files 111 111
Lines 12123 12171 +48
==========================================
+ Hits 9051 9114 +63
+ Misses 2372 2356 -16
- Partials 700 701 +1 ☔ View full report in Codecov by Sentry. |
0b11ce6
to
49278bf
Compare
bfeb90f
to
5bf7f2b
Compare
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.
LGTM
dfa0789
to
eed5b3e
Compare
a476172
to
fccabd3
Compare
968275a
to
c1abd7a
Compare
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.
Half review. Will continue tomorrow
6dcb2f5
to
b1a4fbe
Compare
b1a4fbe
to
a5338d2
Compare
Fix #2323
Fix #2324
Fix #2334
This pull request includes significant changes to the gas price handling in various parts of the codebase. The primary focus is on introducing support for L2 gas prices and renaming existing gas price fields for clarity. The most important changes are grouped by theme and summarized below.
Gas Price Handling Enhancements:
adapters/core2p2p/block.go
: Added support for L2 gas prices and renamed existing gas price fields to distinguish between L1 and L2 gas prices. [1] [2]adapters/p2p2core/block.go
: Updated theAdaptBlockHeader
function to handle L2 gas prices and renamed existing gas price fields.adapters/p2p2core/receipt.go
: Modified theadaptExecutionResources
function to include L2 gas prices.adapters/sn2core/sn2core.go
: Updated theAdaptBlock
andadaptGasConsumed
functions to handle L2 gas prices and renamed existing gas price fields. [1] [2]core/block.go
: Renamed gas price fields to distinguish between L1 and L2 gas prices and updated related hash functions. [1] [2] [3] [4]Test Updates:
adapters/sn2core/sn2core_test.go
: Updated tests to handle L2 gas prices and renamed existing gas price fields. [1] [2] [3] [4] [5]clients/feeder/feeder_test.go
: Modified tests to reflect the renaming of gas price fields. [1] [2] [3] [4]Core Data Structures:
core/block.go
: Updated theHeader
struct to include L2 gas prices and renamed existing gas price fields.core/receipt.go
: Added an L2 gas field to theGasConsumed
struct.core/transaction.go
: Added an L2 gas field to theDataAvailability
struct.These changes ensure that the codebase can handle both L1 and L2 gas prices, providing more granular control and clarity.
Core Data Structures and Adaptation Functions:
core/block.go
: Updated theHeader
struct to includeL1GasPriceETH
,L2GasPriceETH
,L1GasPriceSTRK
, andL2GasPriceSTRK
fields, replacing the previousGasPrice
andGasPriceSTRK
fields. [1] [2]adapters/p2p2core/block.go
: Updated theAdaptBlockHeader
function to include the new L1 and L2 gas price fields.adapters/sn2core/sn2core.go
: Adjusted theAdaptBlock
function to handle the new gas price fields.RPC:
rpc/block.go
: Updated theBlockHeader
struct andadaptBlockHeader
function to include L2 gas prices. [1] [2]rpc/estimate_fee.go
: Introduced a newFeeEstimate
struct to handle L1 and L2 gas prices and added a versionedEstimateFeeV0_7
function for backward compatibility. [1] [2] [3]Test Cases:
adapters/sn2core/sn2core_test.go
: Updated test cases to assert the new gas price fields.rpc/block_test.go
: Added assertions for L2 gas prices in the relevant test cases. [1] [2] [3]rpc/estimate_fee_test.go
: Included tests for the newEstimateFeeV0_7
function.rpc/events_test.go
: Updated expected JSON responses to include L2 gas prices. [1] [2]