Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

bring snapshotting work into master #1577

Merged
merged 87 commits into from Jul 12, 2016
Merged

bring snapshotting work into master #1577

merged 87 commits into from Jul 12, 2016

Conversation

rphmeier
Copy link
Contributor

No description provided.

@rphmeier rphmeier added the A0-pleasereview 🤓 Pull request needs code review. label Jul 11, 2016
@gavofyork
Copy link
Contributor

some tests would be nice...

@gavofyork gavofyork added A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 11, 2016
@NikVolf
Copy link
Contributor

NikVolf commented Jul 11, 2016

@gavofyork +1
guess lack of test is an issue, not a grumble
it will prevents further comfortable modification of the code

@NikVolf NikVolf added A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. and removed A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. labels Jul 11, 2016
}

// write block values.
stream.append(&block_view.transactions()).append(&block_view.uncles());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be more optimal to append rlps directly, without converting to transaction/header structure. transactions_rlp and uncles_rlp can be added to BlockView

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we skip a couple of the fields from the header, i think we have to at least decode that.

block chunking is significantly faster than state chunking even so

let compressed = &compression_buffer[..compressed_size];
let hash = compressed.sha3();

assert!(snappy::validate_compressed_buffer(compressed));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the error be returned instead of panic happening with the assert?

Copy link
Contributor Author

@rphmeier rphmeier Jul 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this assert should be removed outright actually. i added it while debugging but it will only fail if snappy has a bug

@rphmeier
Copy link
Contributor Author

I added account and block tests.

I will add tests for the overall snapshotting mechanism once I implement snapshot restoration. Right now there isn't anything I can see to meaningfully test in that module.

@rphmeier rphmeier added A0-pleasereview 🤓 Pull request needs code review. and removed A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. labels Jul 11, 2016
@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 12, 2016
@NikVolf NikVolf merged commit d956b7c into master Jul 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants