[go: up one dir, main page]

Fix singleprocess inconsistent cache

Context

This MR fixes a bug on nodes running the --singleprocessmode that results in an inconsistent hash.

This bug occurs when the node switches branch on a same level. It is caused by a protocol cache's cache value being registered under the wrong key. The new head's branch would load the resulting cache from its sibling block and would apply the block with it resulting in an inconsistent hash that would lead to a network split.

Manually testing the MR

Launch two nodes running in both validation modes (external process & single process), create a reorg, continue baking on top of the reorg and notice that the inconsistent hash error happens.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading