Skip to content

improve: remove sharedpool from miner#2172

Merged
zzzckck merged 1 commit intobnb-chain:developfrom
zzzckck:remove_sharedpool
Jan 22, 2024
Merged

improve: remove sharedpool from miner#2172
zzzckck merged 1 commit intobnb-chain:developfrom
zzzckck:remove_sharedpool

Conversation

@zzzckck
Copy link
Copy Markdown
Collaborator

@zzzckck zzzckck commented Jan 19, 2024

Description

SharedPool was introduced since v1.1.9, but it has a potential bug and is no longer supported since hertzFix.

This PR is to remove the sharedPool code in miner module, which was introduced in this PR #818 and is useless now.

It has no impact to the current logic, but just code improve

Rationale

NA

Example

NA

Changes

NA


// StateAtWithSharedPool returns a new mutable state based on a particular point in time with sharedStorage
func (bc *BlockChain) StateAtWithSharedPool(root common.Hash) (*state.StateDB, error) {
return state.NewWithSharedPool(root, bc.stateCache, bc.snaps)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the NewWithSharedPool used in the InsertChain function need to be removed?

statedb, err := state.NewWithSharedPool(parent.Root, bc.stateCache, bc.snaps)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Does the NewWithSharedPool used in the InsertChain function need to be removed?

statedb, err := state.NewWithSharedPool(parent.Root, bc.stateCache, bc.snaps)

I am afraid not, InsertChain needs make sure backward compatibility, like the hertzFix case, so we can not remove the sharedPool logic from InsertChain

@zzzckck zzzckck merged commit bea8f8e into bnb-chain:develop Jan 22, 2024
@zzzckck zzzckck deleted the remove_sharedpool branch May 14, 2025 06:11
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.

4 participants