Skip to content

Conversation

@Frozen
Copy link
Collaborator

@Frozen Frozen commented Oct 6, 2025

No description provided.

@Frozen Frozen requested a review from Copilot October 6, 2025 15:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements support for London and Berlin Ethereum hard forks along with corresponding updates to the codebase for Harmony 1.10. The main focus is on updating EVM components and protocol parameters to align with these Ethereum improvements.

  • Updates EVM context structures to use separate block and transaction contexts
  • Adds new gas constants and protocol parameters for London/Berlin fork features
  • Integrates blockchain state handling improvements and tracer updates

Reviewed Changes

Copilot reviewed 87 out of 93 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rpc/harmony/tracer.go Updates EVM context creation to use new block context API
rosetta/services/block.go Updates callback signature for block context parameter
internal/registry/registry.go Adds quorum decision support with getter/setter methods
internal/params/protocol_params.go Adds new gas constants for Keccak operations and EIP-2200 storage
internal/params/config.go Adds new rule flags for London/Berlin fork features
hmy/tracers/tracer.go Updates stack handling to use uint256 and adds block context access
hmy/tracers/block_tracer_test.go Fixes typo in error message and improves test output
hmy/tracers/block_tracer.go Updates stack operations for uint256 compatibility
hmy/tracer.go Major refactor to use separate block/transaction contexts
hmy/override_test.go Updates test interfaces for new precompiled contract types
hmy/override.go Updates override interfaces to use new contract types
hmy/hmy.go Updates EVM creation to use separate contexts
core/vm/testdata/precompiles/* Adds comprehensive test data for new precompiled contracts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

var resultPiece string
if ac.err != nil {
resultPiece = fmt.Sprintf(`,"error":"Reverted","revert":"0x%x"`, ac.revert)
resultPiece = fmt.Sprintf(`,"error":"Reverted","revert":"%x"`, ac.revert)
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

Missing '0x' prefix in hexadecimal format string. Should be \"revert\":\"0x%x\" to maintain consistency with other hex-encoded values in the codebase.

Suggested change
resultPiece = fmt.Sprintf(`,"error":"Reverted","revert":"%x"`, ac.revert)
resultPiece = fmt.Sprintf(`,"error":"Reverted","revert":"0x%x"`, ac.revert)

Copilot uses AI. Check for mistakes.
func (d dummyPrecompile) Run(input []byte) ([]byte, error) { return nil, nil }
func (d dummyPrecompile) RequiredGas(input []byte) uint64 { return 0 }

// func (d dummyPrecompile) RequiredGas(input []byte) uint64 { return 0 }
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

Remove commented-out code. The old RequiredGas method signature is no longer needed since it has been replaced with the new EVM-aware version.

Suggested change
// func (d dummyPrecompile) RequiredGas(input []byte) uint64 { return 0 }

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@mur-me mur-me Oct 6, 2025

Choose a reason for hiding this comment

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

Seems this fixed the segfault on the trace RPC calls

UPD: after normally run for 3 hours it crashed again

* Transient storage functionality

* Commented code block in blockchain_test.go

* Refactor state transition rules and remove commented-out Prepare method

* Remove commented-out code block in chain_makers_test.go

* Remove unnecessary parameter from ChainConfig.Rules calls in runtime.go

* Refactor ActivePrecompiles function to use rules parameter instead of evm.chainRules

* Refactor state transition preparation to use statedb.Prepare method
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