Skip to content
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

Couple suggestion for production version (hashes and validating hashes from other code) #4

Open
apoelstra opened this issue Nov 8, 2015 · 0 comments

Comments

@apoelstra
Copy link

I have a couple suggestions for a production version of this lint that I should write down somewhere (if here is not OK, sorry):

  1. Support requiring a block to have a certain hash, rather than a digital signature. The idea is to mark the code as "do not edit" at least without deliberate thought.
  2. Support requiring other blocks to have a certain hash. So if you change some code, other code that depends on it could be made to fail.

An example of this: one of my library had a recent bug https://github.com/apoelstra/rust-bitcoin/pull/7 which was caused by me changing a type CommandString([u8;12]) to CommandString(String), while still using an unsafe block to copy 12 bytes out of the object (which for a String, might not all be allocated!). Since the unsafe block was intimately tied to the type of CommandString, it'd be great if I could've marked that unsafe block as failing ifever CommandString changed its type.

cc @gmaxwell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant