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

get diff accounts by replaying block when diff layer not found #536

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

keefel
Copy link
Contributor

@keefel keefel commented Nov 10, 2021

Signed-off-by: Keefe-Liu bianze.kernel@gmail.com

Description

Get block's diff accounts by replaying block when diff layer not found.

Rationale

The diff layer just can cache for a few days, when there is no diff layer, the eth_getDiffAccounts API couldn't work, in this case we should replay the block and get the diff accounts, it may slow but i can work right.

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • manual transaction test passed

Already reviewed by

...

Related issues

... reference related issue #'s here ...

@@ -1493,3 +1493,11 @@ func (s *StateDB) SlotInAccessList(addr common.Address, slot common.Hash) (addre
}
return s.accessList.Contains(addr, slot)
}

func (s *StateDB) GetDirtyAccounts() []common.Address {
accounts := make([]common.Address, 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The capacity should be len(s.stateObjectsDirty)

@unclezoro
Copy link
Collaborator

Try fixing the CI as well. Seems integration test stuck

internal/ethapi/api.go Outdated Show resolved Hide resolved
internal/ethapi/api.go Outdated Show resolved Hide resolved
@j75689
Copy link
Contributor

j75689 commented Nov 15, 2021

Try fixing the CI as well. Seems integration test stuck

Sometimes public machines on GitHub are busy, which will cause timeout errors...
just need to re-run it

Signed-off-by: Keefe-Liu <bianze.kernel@gmail.com>
@unclezoro unclezoro merged commit 288eb52 into bnb-chain:develop Nov 16, 2021
@yutianwu yutianwu mentioned this pull request Nov 16, 2021
3 tasks
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.

3 participants