Skip to content

Conversation

@rjl493456442
Copy link
Member

In this PR, the codeDB implementation is introduced and integrated into the blockchain
as a long-term object shared between chain processing and RPC queries.

This serves as a prerequisite for the upcoming StateDB refactoring.

return code
}
code = rawdb.ReadCode(r.db, codeHash)
if len(code) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this check necessary? for the contracts with empty code hash. It could cause an additional DB read

Copy link
Member Author

Choose a reason for hiding this comment

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

The database query for empty code hash will be rejected in the first place, so essentially we expect all the database lookup targets for an existing code

@rjl493456442 rjl493456442 added this to the 1.16.8 milestone Nov 13, 2025
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