Remove accounts bloom#11589
Conversation
Remove the accounts existence bloom filter. Used to compare performance of running with no bloom to running with an optimized bloom (see https://github.com/openethereum/openethereum/pull/11581).
* master: (25 commits) Update .gitmodules (#11628) ethcore/res: activate ecip-1088 phoenix on classic (#11598) Upgrade parity-common deps to latest (#11620) Fix Goerli syncing (#11604) deps: switch to upstream ctrlc (#11617) Deduplicating crate dependencies (part 3 of n) (#11614) Deduplicating crate dependencies (part 2 of n, `slab`) (#11613) Actually save ENR on creation and modification (#11602) Activate POSDAO on xDai chain and update bootnodes (#11610) Activate on-chain randomness in POA Core (#11609) Deduplicating crate dependencies (part 1 of n) (#11606) Update enodes for POA Sokol (#11611) Remove .git folder from dogerignore file so vergen library can get build date and commit hash in the binary generatio vergen library can get build date and commit hash in the binary generation (#11608) Reduced gas cost for static calls made to precompiles EIP2046/1352 (#11583) [easy] `ethcore-bloom-journal` was renamed to `accounts-bloom` (#11605) Use serde_json to export hardcoded sync (#11601) Node Discovery v4 ENR Extension (EIP-868) (#11540) Fix compile warnings (#11595) Update version to 3.0.0-alpha.1 (#11592) ethcore/res: bump canon fork hash for mordor and kotti testnets (#11584) ...
* master: Fix ecrecover builtin (#11623)
| // Sometimes when importing a small number of blocks (~10) the report seems | ||
| // inaccurate, so we sleep a little before getting the report. | ||
| std::thread::sleep(Duration::from_secs(1)); |
There was a problem hiding this comment.
yeah I have no idea wtf. If you try importing 5-10 blocks the report is all messed up, claiming wrong number of blocks were imported. I tossed in this in and moved on without investigating further.
There was a problem hiding this comment.
I was hoping we could figure this out before the merge.
There was a problem hiding this comment.
Firstly apologies for adding this change that has nothing to do with the rest of the PR. I'll remove it.
Secondly, I was not overly worried about it because the import is nondeterministic right? Some (user configurable) verifier threads are going to process the import queue and if the number is small maybe there's a race on the ClientReport so giving it a little more time, I thought, was "fine"?
| for (n, (k,_)) in db.iter(COL_ACCOUNT_BLOOM).enumerate() { | ||
| batch.delete(COL_ACCOUNT_BLOOM, &k); | ||
| if n > 0 && n % 10_000 == 0 { | ||
| info!(target: "migration", " Account Bloom entries queued for deletion: {}", n); | ||
| } | ||
| } | ||
| batch.delete(COL_ACCOUNT_BLOOM, ACCOUNT_BLOOM_HASHCOUNT_KEY); |
There was a problem hiding this comment.
we could use the new (not published yet) kvdb api to simplify this paritytech/parity-common#368
There was a problem hiding this comment.
This migration is really quick to run. We can tweak this when we get around to updating the kvdb-*s.
Co-Authored-By: Andronik Ordian <write@reusable.software>
…h/parity-ethereum into dp/chore/remove-accounts-bloom * 'dp/chore/remove-accounts-bloom' of github.com:paritytech/parity-ethereum: Update ethcore/db/src/db.rs
|
One concern that was raised about removing the bloom filter was it might hurt performance in older parts of the chain severely. I tried this by syncing eth from genesis up to block 2.7M. No blooms: Took 5h33m10s. With bloom: Took 06h27m06s The big difference was something I did not expect. |
| // Sometimes when importing a small number of blocks (~10) the report seems | ||
| // inaccurate, so we sleep a little before getting the report. | ||
| std::thread::sleep(Duration::from_secs(1)); |
There was a problem hiding this comment.
I was hoping we could figure this out before the merge.
This reverts commit 5f32878.
Remove the accounts existence bloom filter.
The bloom has numerous problems:
For this reason this PR removes the bloom filter entirely. See https://github.com/openethereum/openethereum/pull/11581 for more details and benchmarks.