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

invalidateblock goes back one block at a time, and doesn't reorg properly #86

Open
roylee17 opened this issue Aug 16, 2022 · 1 comment
Assignees

Comments

@roylee17
Copy link
Collaborator

For example,

100 -> 101 -> 102 -> 103  (main chain)
     \ 101a (side chain)
  1. invalidate one block at a time from the tip works.
$ getbestblock
{
  hash: HASH_OF_103
  height: 103
}

$ invalidateblock HASH_OF_103
$ invalidateblock HASH_OF_102

$ getbestblock
{
  hash: HASH_OF_101
  height: 101
}
  1. However, even if we invalidate block 101, the main chain doesn't reorg properly to block 101a
$ invalidateblock HASH_OF_101 
$ getbestblock
{
  hash: HASH_OF_101a
  height: 101a
}
$ getblock HASH_OF_101a
block HASH_OF_101a is not in the main chain
  1. invalidate more than one block at a time cause lbcd goes rogue. Starting to exhaust CPU and memory.
$ getbestblock
{
  hash: HASH_OF_103
  height: 103
}

$ invalidateblock HASH_OF_101
(lbcd goes rogue...)
@roylee17
Copy link
Collaborator Author

lbryio/lbry-sdk#3520

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