-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
will require full upgrade of mem-db hash-db trie-db (memdb only is not enough). also parity common crate using those three need an upgrade (plus trie-hash need feature std to avoid error on build).
Note: paritytech/parity-common#93 is now merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff. I'll be back for a proper review once the trie is updated so I can run the code. :)
ethcore/light/src/cache.rs
Outdated
impl HeapSizeOf for Cache { | ||
fn heap_size_of_children(&self) -> usize { | ||
|
||
// TODO this is fast method: should feature gate an exhaustive implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please file an issue and add a ref to this comment.
@@ -63,7 +63,8 @@ extern crate parity_bytes as bytes; | |||
extern crate ethereum_types; | |||
extern crate ethcore; | |||
extern crate hash_db; | |||
extern crate heapsize; | |||
extern crate parity_util_mem as malloc_size_of; | |||
extern crate parity_util_mem as mem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is confusing, it will require devs to come here to look. I think I'd prefer explicit paths here.
@@ -97,6 +96,8 @@ extern crate patricia_trie_ethereum as ethtrie; | |||
extern crate rand; | |||
extern crate rayon; | |||
extern crate rlp; | |||
extern crate parity_util_mem as mem; | |||
extern crate parity_util_mem as malloc_size_of; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem as above
@@ -16,7 +16,8 @@ | |||
|
|||
//! `JournalDB` interface and implementation. | |||
|
|||
extern crate heapsize; | |||
extern crate parity_util_mem as mem; | |||
extern crate parity_util_mem as malloc_size_of; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem as above
Needs rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heapsizeof
removal seems straight forward and I like it a lot.
The new trie api with all those the prefix stuff is not so nice, but I honestly don't know of a better way. :/
I'm also not clear on why we needed the prefix in the first place, but I'll ask that question elsewhere.
@cheme I've run this branch on mainnet over the weekend. Looks good. Very odd that CI failed after last commit, seems completely unrelated. Launched a new run. |
So things left to do here:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo David's comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go. I had some small nitpicks but if you're busy with other stuff I'm ok merging this as-is.
I am going to address them (malloc_size_of alias when it is required by the derive macro). I thought I did address them but that was not the case :( |
@cheme merge whenever you're ready. |
…anager * master: Print warnings when using dangerous settings for ValidatorSet (#10733) ethcore/res: activate atlantis classic hf on block 8772000 (#10766) refactor: Fix indentation (#10740) Updated Bn128PairingImpl to use optimized batch pairing (#10765) fix: aura don't add `SystemTime::now()` (#10720) Initialize private tx logger only if private tx functionality is enabled (#10758) Remove unused code (#10762) Remove calls to heapsize (#10432)
…dp/fix/prevent-building-block-on-top-of-same-parent * dp/chore/aura-log-validator-set-in-epoch-manager: remove dead code Treat empty account the same as non-exist accounts in EIP-1052 (#10775) docs: Update Readme with TOC, Contributor Guideline. Update Cargo package descriptions (#10652) cleanup On second thought non-validators are allowed to report Move Engine::register_client to be before other I/O handler registration (#10767) cleanup Print warnings when using dangerous settings for ValidatorSet (#10733) ethcore/res: activate atlantis classic hf on block 8772000 (#10766) refactor: Fix indentation (#10740) Updated Bn128PairingImpl to use optimized batch pairing (#10765) fix: aura don't add `SystemTime::now()` (#10720) Initialize private tx logger only if private tx functionality is enabled (#10758) Remove unused code (#10762) Remove calls to heapsize (#10432)
This pr remove calls to heapsize crate (the crate will still be in the dependency tree from other crates).
It replace heapsize calls by malloc_size call which are basically the same but defined into 'parity-util-mem' (we got additional option and a feature for only running memory estimation (not calling the allocator)).
This cannot be merged as it is and require first that paritytech/parity-common#93 get merged and published and then that paritytech/trie#14 get merged and published. See the patched crates in Cargo.toml.
Yet it can be reviewed.
Also it is currently set (in Cargo.toml) to use jemalloc and crate size estimation (that may not be the target).