-
Notifications
You must be signed in to change notification settings - Fork 0
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
GD Optimizations #8
Conversation
Errors EncountedError 1Running this code as it is will result in the error:
This first one is resolved by doing this (assumes
Error 2Next, I get an error later on related to relations_store/relations_service:
|
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.
Initial thoughts on the code
ad7ef2c
to
1645929
Compare
selected_tip, | ||
level, | ||
proof_selected_tip_gd, | ||
) { | ||
let selected_tip_blue_work_diff = | ||
SignedInteger::from(proof_selected_tip_gd.blue_work) - SignedInteger::from(proof_common_ancestor_gd.blue_work); | ||
for parent in self.parents_manager.parents_at_level(¤t_pp_header, level).iter().copied() { |
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.
let parent_blue_work = self.ghostdag_stores[level_idx].get_blue_work(parent).unwrap();
This needs to a better substitute
if proof_selected_tip_gd.blue_score < 2 * self.pruning_proof_m { | ||
continue; | ||
} | ||
|
||
match relations_read[level_idx].get_parents(current_pp).unwrap_option() { | ||
Some(parents) => { | ||
if parents |
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.
Rethink:
self.ghostdag_stores[level_idx].get_blue_score(parent).unwrap() < 2 * self.pruning_proof_m)
8ddc9fa
to
01befd3
Compare
In 01befd3 I added a fix for the With this fix, the Error 3
Notes:
|
03004e4
to
e5ff82b
Compare
Co-authored-by: Ori Newman <[email protected]>
Co-authored-by: Ori Newman <[email protected]>
Co-authored-by: Ori Newman <[email protected]>
Co-authored-by: Ori Newman <[email protected]>
Co-authored-by: Ori Newman <[email protected]>
Co-authored-by: Ori Newman <[email protected]>
apply_proof only inserts parent entries for a header from the proof into the relations store for a level if there was GD data in the old stores for that header. This adds a check to filter out parent records not in relations store
…cient root This happens when there's not enough headers in the pruning proof but it satisfies validation
relations.get_parents on GD gets extra parents that aren't in the current GD store. so get_blue_work throws an error next, ORIGIN was mising from the GD so add that
* replace statrs and statest deps. * remove todo in toml.cargo and fmt & lints. * do a run of `cargo audit fix` for some miscellaneous reports. * use maintained alt ks crate. * add cargo.lock. * update * use new command * newline * refresh cargo lock with a few more version updates * fix minor readme glitches --------- Co-authored-by: Michael Sutton <[email protected]>
* sighash reused trait * benches are implemented * use cache per iteration per function * fix par versions * fix benches * use upgreadable read * use concurrent cache * use hashcache * dont apply cache * rollback rwlock and indexmap. * remove scc * apply par iter to `check_scripts` * refactor check_scripts fn, fix tests * fix clippy * add bench with custom threadpool * style: fmt * suppress warnings * Merge branch 'master' into bcm-parallel-processing * renames + map err * reuse code * bench: avoid exposing cache map + iter pools in powers of 2 * simplify check_sig_op_counts * use thread pool also if a single input 1. to avoid confusion 2. since tokio blocking threads are not meant to be used for processing anyway * remove todo * clear cache instead of recreate * use and_then (so map_err can be called in a single location) * extend check scripts tests for better coverage of the par_iter case --------- Co-authored-by: Michael Sutton <[email protected]>
* Parallelize MuHash calculations MuHash calculations are additive and can be done in chunks then later combined * Reimplement validate tx with muhash as a separate fn * Use smallvec for muhash parallel Co-authored-by: Michael Sutton <[email protected]> * Add independent rayon order test * Filter some data * Use tuple_windows for test iter --------- Co-authored-by: Michael Sutton <[email protected]>
…#581) * semantic: add `from` ext methods * muhash from txs benchmark * optimization: in u3072 mul test if lhs is one * extract `parallelism_in_power_steps` * comment
- use BlueWorkType - fix some comments
* rust 1.82 fixes * sig op count std check
Co-authored-by: Michael Sutton <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>
Co-authored-by: Michael Sutton <[email protected]>
Merged in mainline |
Initial changes from ori's branch to easily view it