-
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
fix(audit): use block gas limit in block context #171
Conversation
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
hmm need to fix test setup part to fix build & test |
Caution Review failedThe pull request is closed. WalkthroughThis pull request modifies the gas limit calculation in the EVM module. The Changes
Sequence Diagram(s)sequenceDiagram
participant K as Keeper
participant B as buildBlockContext
participant G as BlockGasLimit
participant CP as ConsensusParams/BlockGasMeter
K->>B: Initiate block context building
B->>G: Call BlockGasLimit(sdkCtx)
alt Block gas meter available and valid
G->>CP: Check gas meter limit
CP-->>G: Return gas meter limit
else Block gas meter unavailable/invalid
G->>CP: Retrieve consensus parameters
CP-->>G: Return MaxGas value or indicate nil block
end
G-->>B: Return determined gas limit
B-->>K: Complete block context with new gas limit
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 golangci-lint (1.62.2)level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package injective: could not load export data: no export data for "github.com/cosmos/relayer/v2/relayer/codecs/injective"" 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
x/evm/keeper/context.go
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Build & Test
x/evm/keeper/context.go
[error] 70-70: Test_NotSpendingGasForTxWithFeeDenom failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_SkipSequenceCheck failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_onAckIcs20Packet_noMemo failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_NotSpendingGasForTxWithFeeDenom failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_FloodingQuery failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_NewPendingTransactionFilter_FullTx failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_SetDenomMetadata failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_AllowLongCosmosAddress failed: runtime error: invalid memory address or nil pointer dereference.
[error] 70-70: Test_SnapshotRevert failed: runtime error: invalid memory address or nil pointer dereference.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Minitiad
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit