Closed holgerd77 closed 1 year ago
Hi @vpulim, can you have a look at this since I think that this might be a (severe) bug in the blockchain library?
Hi @holgerd77, I'm having a hard time reproducing this. Can you send me any more details that might help? Node version, leveldown version, how many blocks are synced in your geth db... Does this happen consistently with a fresh geth db? Also, can you share the exact javascript code you are running, as well as your package-lock.json file.
In general, the geth DB structure is fairly complex and I wouldn't be surprised if geth failed to read the DB after an ethereumjs-blockchain write operation is performed (we should explicitly state this as a warning in the README). However, it shouldn't break the DB if all we're doing is iterating, except to write some new keys to track the VM iterator heads, so that is definitely a bug.
Have added a warning to the README
on this along with the PR for an v.3.3.0
release: https://github.com/ethereumjs/ethereumjs-blockchain/pull/72
Along the latest README updates I have removed the Geth example since it was outdated anyhow, will close here.
When I run the geth iterator example from the README with geth
1.8.14-stable
and having synced some blocks with:...I am ending up with a compromised geth database, so running the geth sync command from above again gives me the following error stack (shortened):
This is also happening when removing the
iterator(...)
call from the example code.