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
allow export of sha256sum for snapshots #1979
Conversation
It's tricky to compute the hash concurrently with snapshot creation before it would have to happen in the daemon rather than in the client? |
We would need to implement our own |
Nah, let's leave it for the future. Or maybe @hanabi1224 could have a look at it. |
2eddfad
to
c2fe947
Compare
It shouldn't be that difficult, just a wrapper around a |
d4dcf45
to
3490e35
Compare
@lemmih I revamped the hashing technology, please take a look again as it has changed a bit. |
79f6adf
to
c221c57
Compare
Something is not right after merging with mainstream, will investigate why. |
Should be fine now. I did not handle partial write on |
Can We'll end up using |
I can rename |
I feel like we have too may |
I kind of prefer many smaller crates partitioned by their categories than one big crate. Makes it easier to reason about dependencies and cuts compilations times.
This also doesn't work for me, conceptually. Importing |
I moved it to |
What does it mean to "reason about dependencies" and I don't think it would cut compilation time. In what scenario would it cut compilation time? |
If I would see
To my understanding, if you change something in one significant crate dependency (especially the |
While nice to have, I don't think that justifies the significant administrative cost of having a plethora of crates.
But the bulk of our code will use all of the utility crates. I have a hard time imagining that having two crates for |
How could it not save compilation time? You change something in
You change something in
Of course, it won't cut the time by 80%, but when you do changes and monitor everything with All in all, up to you. Maybe it's only my unpopular opinion. |
Your example highlights my point. Even in such an extreme case where lots of crates are recompiled, the difference is only a few seconds: 18.61s vs 22.58s. It was good discussing the pros and cons. Let's not add any more crates at this time. |
In this case I think the linkage of forest executable takes ~15s (on my machine) for both cases, maybe |
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!
@@ -70,32 +77,56 @@ where | |||
} | |||
|
|||
let file = File::create(&out).await.map_err(JsonRpcError::from)?; | |||
let writer = BufWriter::new(file); | |||
let writer = AsyncWriterWithChecksum::<Sha256, _>::new(BufWriter::new(file)); |
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.
In the case we want to skip this checksum, it seems to me we are still paying the price of computing it, only skipping saving the file no?
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.
Hm, indeed. We'll address that in another PR.
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Other information and links
Part of #1899