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

Define "next state root hash" for BlockChain and its behavior and refactor relevant code. #3829

Open
greymistcube opened this issue Jun 18, 2024 · 0 comments

Comments

@greymistcube
Copy link
Contributor

We only need single "next state root hash" at any time for a BlockChain object and this does not need to be tracked in storage.
As for BlockChain.GetNextStateRootHash() method, there are numerous problems:

  • It isn't at all clear how the internal dictionary is managed. The result is too reliant code-paths that can be taken.
    • Having management of its state in the background only obfuscates it being rather ill-defined, which exacerbates the issue.
  • The method has a blocking implementation. This shouldn't be blocked from BlockChain's side, but rather the caller's side.
  • Shared storage between possible forks, although this may not be a non-issue in practice, adds unnecessary complexity.
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

No branches or pull requests

1 participant