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

bump geth to v1.14.11 #99

Merged
merged 4 commits into from
Nov 8, 2024
Merged

bump geth to v1.14.11 #99

merged 4 commits into from
Nov 8, 2024

Conversation

beer-1
Copy link
Collaborator

@beer-1 beer-1 commented Nov 4, 2024

Description

Diff between initia-labs/evm<>go-ethereum
=> ethereum/go-ethereum@v1.14.11...initia-labs:evm:main


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...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers 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...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Updated dependencies to the latest versions for improved performance and security.
  • Bug Fixes

    • Addressed vulnerabilities by updating specific module versions.
  • Refactor

    • Enhanced the handling of precompiled contracts within the Ethereum virtual machine context.
    • Streamlined state management in CosmosPrecompile and ERC20RegistryPrecompile structures.
  • Chores

    • Removed deprecated variables and functions related to precompile address checks.

@beer-1 beer-1 requested a review from a team as a code owner November 4, 2024 06:19
Copy link

coderabbitai bot commented Nov 4, 2024

Walkthrough

The changes in this pull request involve updates to the go.mod files for both the main project and the integration-tests module. Key modifications include version upgrades for several dependencies, notably github.com/supranational/blst, which was updated from v0.3.11 to v0.3.13. Additionally, the module replacement for github.com/ethereum/go-ethereum has been updated to a newer version. The keeper package has also seen significant changes in method signatures and internal structures, particularly regarding the management of precompiled contracts. These updates reflect routine maintenance to ensure compatibility and security.

Changes

File Change Summary
go.mod - Updated github.com/supranational/blst from v0.3.11 to v0.3.13
- Replaced github.com/ethereum/go-ethereum with github.com/initia-labs/evm at new version v0.0.0-20241105070652-c43b570a4e98
integration-tests/go.mod - Updated github.com/initia-labs/initia from v0.5.6 to v0.6.0
- Updated github.com/initia-labs/kvindexer from v0.1.8 to v0.1.9
- Updated github.com/initia-labs/movevm from v0.5.0 to v0.6.0
- Updated github.com/supranational/blst from v0.3.11 to v0.3.13
- Replaced github.com/ethereum/go-ethereum with github.com/initia-labs/evm at new version v0.0.0-20241105070652-c43b570a4e98
x/evm/keeper/context.go - Updated method signatures for CreateEVM, EVMStaticCall, EVMCall, and EVMCreateWithTracer to enhance precompile handling.
x/evm/keeper/keeper.go - Changed precompiles field type from []precompile to vm.PrecompiledContracts
- Added new field precompileAddrs []common.Address
x/evm/keeper/precompiles.go - Modified loadPrecompiles to utilize vm.ActivePrecompiledContracts for better precompile management.
x/evm/precompiles/cosmos/contract.go - Updated method receivers from value to pointer for several methods in CosmosPrecompile.
x/evm/precompiles/erc20_registry/contract.go - Updated method receivers from value to pointer for several methods in ERC20RegistryPrecompile.
x/evm/types/address.go - Removed ERC721RegistryPrecompileAddress variable and IsPrecompileAddress function.
x/evm/types/expected_keeper.go - Renamed WithStateDB interface to SetStateDB with updated method signature.

Possibly related PRs

  • bump evm-tx submodule #60: This PR updates the version of github.com/supranational/blst from v0.3.11 to v0.3.13, which is the same version change reflected in the main PR.
  • fix: blockhash to align with x/evm params #87: This PR updates the github.com/ethereum/go-ethereum dependency to a version that is also updated in the main PR, indicating a direct connection in dependency management.
  • fix: use snapshot to support revert #90: The updates in the context.go file regarding EVM execution context preparation are relevant to the changes in the main PR, which also focuses on improving the management of dependencies and module configurations.
  • chore: use kvindexr which ignores cache error #94: This PR updates the github.com/initia-labs/kvindexer dependency to version v0.1.9, which is relevant as the main PR also involves updates to dependencies, although it does not specifically mention kvindexer.

🐇 In the meadow, changes bloom,
Dependencies updated, making room.
From blst to evm, we leap with glee,
Hopping along, as happy as can be!
With each new version, our code takes flight,
A rabbit's joy in the coding night! 🌙✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between d4ed4ae and b6334cd.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • integration-tests/go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (2 hunks)
  • integration-tests/go.mod (4 hunks)
🔇 Additional comments (4)
integration-tests/go.mod (3)

11-11: Review major version bumps for breaking changes

Several initia packages have been updated to new major/minor versions:

  • initia: v0.5.6 -> v0.6.0 (major)
  • kvindexer: v0.1.8 -> v0.1.9 (minor)
  • movevm: v0.5.0 -> v0.6.0 (major)

Major version bumps (v0.5.x -> v0.6.0) might introduce breaking changes. Please ensure:

  1. All breaking changes have been addressed
  2. Integration tests have been updated accordingly
#!/bin/bash
# Description: Look for potential breaking changes in the changelog or release notes
# Expected: Find information about breaking changes in v0.6.0

# Check for CHANGELOG.md or similar files
fd -t f "CHANGELOG.md|BREAKING_CHANGES.md" --exec cat {}

Also applies to: 149-154


206-206: Verify blst update compatibility

The blst cryptographic library has been updated from v0.3.11 to v0.3.13. While this is a minor version bump, cryptographic libraries require careful verification.

#!/bin/bash
# Description: Check for any security-related changes or known issues
# Expected: Find information about changes between v0.3.11 and v0.3.13

# Check for security-related commits or issues
gh api repos/supranational/blst/releases --jq '.[] | select(.tag_name=="v0.3.13" or .tag_name=="v0.3.12") | .body'

274-274: Verify geth version alignment with v1.14.11

The PR objective is to bump geth to v1.14.11, but the replacement directive points to a specific commit hash. Let's verify if this commit corresponds to the intended version.

✅ Verification successful

The previous script didn't return the expected commit message. Let me try a different approach to verify the geth version alignment.


Let me try one more approach to verify the version information.


✅ The go-ethereum replacement correctly aligns with v1.14.11

The commit f8482395518d in initia-labs/evm repository is a merge commit that explicitly includes the tag 'v1.14.11' as shown in the commit message "Merge tag 'v1.14.11'". This confirms that the replacement directive in go.mod is correctly pointing to a commit that incorporates geth v1.14.11.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the commit hash corresponds to v1.14.11 tag
# Expected: The commit should be based on geth v1.14.11

# Check the commit message and tags
gh api repos/initia-labs/evm/commits/f8482395518d --jq '.commit.message'

Length of output: 453


Script:

#!/bin/bash
# Let's check the repository content at that specific commit
gh api repos/initia-labs/evm/contents?ref=f8482395518d --jq '.[].name'

# Also check if there's any tag information
gh api repos/initia-labs/evm/tags --jq '.[].name'

# Let's also look at the go.mod file at that commit to see what version it's based on
gh api repos/initia-labs/evm/contents/go.mod?ref=f8482395518d --jq '.content' | base64 -d

Length of output: 737


Script:

#!/bin/bash
# Let's try to get the raw content of go.mod without using base64
gh api -H "Accept: application/vnd.github.raw+json" repos/initia-labs/evm/contents/go.mod?ref=f8482395518d

# Also check the commit directly
gh api repos/initia-labs/evm/commits/f8482395518d --jq '.commit.message, .parents[].sha'

Length of output: 7287

go.mod (1)

227-227: LGTM: blst dependency update

The update of github.com/supranational/blst to v0.3.13 aligns with the geth update.

go.mod Outdated Show resolved Hide resolved
@beer-1 beer-1 marked this pull request as draft November 4, 2024 09:15
@beer-1 beer-1 marked this pull request as ready for review November 5, 2024 07:33
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 83.78378% with 6 lines in your changes missing coverage. Please review.

Project coverage is 28.31%. Comparing base (885391c) to head (c000b6a).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
x/evm/precompiles/cosmos/contract.go 62.50% 3 Missing ⚠️
x/evm/precompiles/erc20_registry/contract.go 57.14% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
- Coverage   28.34%   28.31%   -0.03%     
==========================================
  Files         126      126              
  Lines       14022    14014       -8     
==========================================
- Hits         3974     3968       -6     
+ Misses       9487     9485       -2     
  Partials      561      561              
Files with missing lines Coverage Δ
x/evm/keeper/context.go 77.36% <100.00%> (+0.05%) ⬆️
x/evm/keeper/keeper.go 71.22% <100.00%> (+0.42%) ⬆️
x/evm/keeper/precompiles.go 82.35% <100.00%> (-3.02%) ⬇️
x/evm/types/address.go 66.66% <ø> (+12.12%) ⬆️
x/evm/precompiles/cosmos/contract.go 51.26% <62.50%> (-0.21%) ⬇️
x/evm/precompiles/erc20_registry/contract.go 52.38% <57.14%> (-0.45%) ⬇️

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Outside diff range and nitpick comments (3)
x/evm/precompiles/erc20_registry/contract.go (2)

Line range hint 46-159: Consider refactoring method handlers for better maintainability.

While the implementation is functionally correct, the ExtendedRun method is quite long and handles multiple concerns. Consider extracting the method handlers into separate functions to improve readability and maintainability.

Example refactoring:

 func (e *ERC20RegistryPrecompile) ExtendedRun(caller vm.ContractRef, input []byte, suppliedGas uint64, readOnly bool) (resBz []byte, usedGas uint64, err error) {
     // ... snapshot and context setup ...
     
     switch method.Name {
     case METHOD_REGISTER:
-        ctx.GasMeter().ConsumeGas(REGISTER_GAS, "register_erc20")
-        if readOnly {
-            return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrNonReadOnlyMethod.Wrap(method.Name)
-        }
-        if err := e.k.Register(ctx, caller.Address()); err != nil {
-            return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error())
-        }
-        resBz, err = method.Outputs.Pack(true)
+        resBz, err = e.handleRegister(ctx, method, caller, readOnly)
     case METHOD_REGISTER_FROM_FACTORY:
-        // ... similar pattern ...
+        resBz, err = e.handleRegisterFromFactory(ctx, method, caller, readOnly, args)
     // ... other cases ...
     }
     
     usedGas = ctx.GasMeter().GasConsumedToLimit()
     return resBz, usedGas, err
 }

+func (e *ERC20RegistryPrecompile) handleRegister(ctx types.Context, method *abi.Method, caller vm.ContractRef, readOnly bool) ([]byte, error) {
+    ctx.GasMeter().ConsumeGas(REGISTER_GAS, "register_erc20")
+    if readOnly {
+        return nil, types.ErrNonReadOnlyMethod.Wrap(method.Name)
+    }
+    if err := e.k.Register(ctx, caller.Address()); err != nil {
+        return nil, types.ErrPrecompileFailed.Wrap(err.Error())
+    }
+    return method.Outputs.Pack(true)
+}

Line range hint 161-169: Add documentation explaining the gas calculation strategy.

While the implementations are correct, it would be helpful to add comments explaining:

  1. Why RequiredGas returns 0 (because gas calculation is handled in ExtendedRun)
  2. Why Run is not supported (because ExtendedRun provides necessary context for gas metering and state management)
x/evm/keeper/keeper.go (1)

81-83: LGTM! Good architectural improvements.

The changes improve the integration with go-ethereum by:

  1. Using vm.PrecompiledContracts directly instead of a custom type
  2. Adding precompileAddrs for efficient address lookups

This aligns well with the geth v1.14.11 upgrade and follows EVM implementation best practices.

Consider adding a method to validate that precompileAddrs stays in sync with precompiles to prevent potential inconsistencies.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b6334cd and c000b6a.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • integration-tests/go.sum is excluded by !**/*.sum
📒 Files selected for processing (11)
  • go.mod (2 hunks)
  • integration-tests/go.mod (4 hunks)
  • x/evm/keeper/context.go (4 hunks)
  • x/evm/keeper/keeper.go (3 hunks)
  • x/evm/keeper/precompiles.go (2 hunks)
  • x/evm/precompiles/cosmos/contract.go (5 hunks)
  • x/evm/precompiles/cosmos/contract_test.go (9 hunks)
  • x/evm/precompiles/erc20_registry/contract.go (3 hunks)
  • x/evm/precompiles/erc20_registry/contract_test.go (1 hunks)
  • x/evm/types/address.go (0 hunks)
  • x/evm/types/expected_keeper.go (1 hunks)
💤 Files with no reviewable changes (1)
  • x/evm/types/address.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • go.mod
  • integration-tests/go.mod
🔇 Additional comments (20)
x/evm/types/expected_keeper.go (1)

93-94: LGTM! Improved interface naming and separation of concerns.

The renaming from WithStateDB to SetStateDB better follows Go naming conventions for setter methods. The removal of the vm.PrecompiledContract return type suggests a good separation of concerns, where state management is now independent of contract creation.

Let's verify the impact of this breaking change on existing implementations:

x/evm/precompiles/erc20_registry/contract.go (3)

15-17: LGTM: Appropriate use of pointer receivers for interface implementations.

The change to pointer receivers is correct as the ERC20RegistryPrecompile needs to maintain state across method calls.


25-31: LGTM: Constructor properly returns pointer and handles errors.

The constructor follows Go best practices by returning a pointer and properly handling errors by returning nil on failure.


34-36: LGTM: Clean implementation of state setter.

The SetStateDB method correctly uses a pointer receiver to modify the contract's state.

x/evm/precompiles/erc20_registry/contract_test.go (2)

79-79: LGTM: Simplified state setting approach

The change from WithStateDB to SetStateDB aligns with better practices by:

  • Using a more direct and clear method name
  • Avoiding unnecessary type assertions
  • Maintaining the same functionality with simpler code

Line range hint 1-180: Verify test coverage with updated geth version

The test suite comprehensively covers key scenarios including:

  • ERC20 registration
  • Factory-based registration
  • Store registration
  • Gas limit checks
  • Read-only operation validation

However, given the geth version update, let's verify there are no new edge cases to test.

x/evm/keeper/keeper.go (1)

160-162: Verify precompile initialization in loadPrecompiles()

The initialization looks good, but we should verify the loadPrecompiles() implementation to ensure:

  1. Both precompiles and precompileAddrs are properly populated
  2. Thread safety is maintained if precompiles can be modified post-initialization

Let's check the loadPrecompiles implementation:

✅ Verification successful

Let me gather more context about the precompiles implementation to verify both concerns.


Precompile initialization verified and secure

The implementation in loadPrecompiles() properly handles both concerns:

  1. Both fields are correctly populated:

    • precompiles is initialized with active precompiled contracts and custom precompiles
    • precompileAddrs is populated with corresponding addresses using slices.Clone
  2. Thread safety is not a concern as:

    • The precompiles are only set once during initialization
    • No subsequent modifications to precompiles were found in the codebase
    • The implementation follows a clear initialization pattern without concurrent access
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for loadPrecompiles implementation
rg -A 10 "func.*loadPrecompiles" 

Length of output: 640


Script:

#!/bin/bash
# Get more context around loadPrecompiles implementation
rg -A 30 "func.*loadPrecompiles"

# Search for any mutex/sync usage in the keeper
rg "sync\." "x/evm/keeper/"

# Search for any modifications to precompiles after initialization
ast-grep --pattern 'k.precompiles = $_'

Length of output: 2005

x/evm/precompiles/cosmos/contract.go (5)

25-27: LGTM! Consistent interface implementations with pointer receivers

The change to pointer receivers for interface implementations is appropriate since the methods need to modify the struct's state (e.g., SetStateDB).


Line range hint 52-67: LGTM! Constructor properly returns pointer and handles errors

The constructor changes align with Go best practices:

  • Returns a pointer to CosmosPrecompile
  • Proper error handling by returning nil on failure
  • Complete initialization of all struct fields

Line range hint 70-86: LGTM! Methods properly implemented with pointer receivers

The implementation is correct and follows best practices:

  • Proper use of pointer receivers for state modification
  • Thorough error handling in originAddress
  • Clear separation of concerns between state management and address handling

352-354: LGTM! Run method properly indicates exclusive ExtendedRun usage

The implementation correctly indicates that this precompile works exclusively with ExtendedRun, preventing misuse of the standard Run method.


347-349: ⚠️ Potential issue

Potential DoS vector: RequiredGas returns 0

Returning 0 from RequiredGas means no gas cost for precompile execution, which could potentially be exploited for DoS attacks. Consider implementing proper gas calculation based on input size and operation complexity.

x/evm/keeper/context.go (2)

242-242: LGTM: Consistent updates to Prepare calls

The addition of k.precompileAddrs parameter to Prepare calls is consistently applied across all EVM operations (StaticCall, Call, Create), aligning with geth v1.14.11's API changes.

Also applies to: 280-280, 374-374


196-197: LGTM: Precompile handling updated for geth v1.14.11

The change from precompiles.toMap(stateDB) to k.Precompiles(stateDB) aligns with the geth v1.14.11 update.

Let's verify the thread safety of the new precompiles implementation:

x/evm/precompiles/cosmos/contract_test.go (2)

70-70: LGTM! Consistent implementation of SetStateDB across all test functions.

The changes consistently replace WithStateDB with SetStateDB across all test functions, maintaining uniform behavior throughout the test suite.

Also applies to: 116-116, 162-162, 193-193, 224-224, 297-297, 403-403, 450-450, 492-492


70-70: Verify thread safety implications of mutable state.

The change from WithStateDB to SetStateDB indicates a shift from immutable to mutable state management. While this is fine for the test environment, we should verify that the production code properly handles concurrent access to the state.

Also applies to: 116-116, 162-162, 193-193, 224-224, 297-297, 403-403, 450-450, 492-492

x/evm/keeper/precompiles.go (4)

38-39: Validate the use of an empty sdk.Context{}

On line 38, the code initializes chainConfig using an empty sdk.Context{}:

chainConfig := types.DefaultChainConfig(sdk.Context{})

Ensure that using an empty context does not lead to unintended behavior. If DefaultChainConfig relies on context values (like block height, chain ID, etc.), passing an empty context might result in incorrect configurations.

Would you like assistance in verifying whether sdk.Context{} provides all necessary values for DefaultChainConfig?


41-44: Confirm correct integration of custom precompiles

Lines 41-44 add custom precompiles to the existing precompiled contracts:

precompiles := vm.ActivePrecompiledContracts(rules)
precompiles[types.CosmosPrecompileAddress] = cosmosPrecompile
precompiles[types.ERC20RegistryPrecompileAddress] = erc20RegistryPrecompile
k.precompiles = precompiles

Ensure that the custom precompiles (cosmosPrecompile and erc20RegistryPrecompile) are fully compatible with the expected interface and behavior of precompiled contracts in the EVM. Improper integration may lead to execution errors or unexpected behavior during contract calls.


46-48: Verify the correctness of precompileAddrs order

The code clones the active precompile addresses and appends custom addresses:

precompileAddrs := slices.Clone(vm.ActivePrecompiles(rules))
precompileAddrs = append(precompileAddrs, types.CosmosPrecompileAddress, types.ERC20RegistryPrecompileAddress)
k.precompileAddrs = precompileAddrs

While appending addresses, ensure that the order of addresses in precompileAddrs does not affect the initialization or execution of precompiles. If order is significant in any context where precompileAddrs is used, consider inserting the custom addresses at appropriate positions.


5-5: ⚠️ Potential issue

Ensure compatibility with the slices package

The import statement on line 5:

"slices"

introduces the use of the slices package from the Go standard library, which was added in Go 1.21. Please verify that the project's Go version has been updated to at least 1.21 to support this package. Using a newer Go version without updating the project settings may lead to build errors.

Run the following script to confirm the Go version specified in the project:

✅ Verification successful

Go version is compatible with slices package

The project uses Go 1.22.5, which fully supports the slices package introduced in Go 1.21. The import statement is safe to use.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the Go version specified in go.mod files.

# Test: Extract the Go version from go.mod. Expect: Version >= 1.21.
grep "^go " go.mod

Length of output: 30

x/evm/keeper/precompiles.go Show resolved Hide resolved
Copy link
Contributor

@djm07073 djm07073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@beer-1 beer-1 merged commit 883a73e into main Nov 8, 2024
9 checks passed
@beer-1 beer-1 deleted the bump/geth branch November 8, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants