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

improve handling of u64 -> usize conversions at API border #652

Open
porcuquine opened this issue May 14, 2019 · 0 comments
Open

improve handling of u64 -> usize conversions at API border #652

porcuquine opened this issue May 14, 2019 · 0 comments

Comments

@porcuquine
Copy link
Collaborator

porcuquine commented May 14, 2019

Description

See discussion (#641 (comment)) leading up to and including the following summary:

  • Use usize everywhere internally.
  • Use u64 for API calls across the FFI border.
  • Convert from u64 to usize in order to generate parameters required for both proving and verification.
  • Fail with error if API client tries to replicate a too-large sector on a 32-bit system. i.e. bounds-check at conversion time, as early as possible.
  • Note that because we only need to convert the number of 32-byte nodes to usize in order to verify, this will let us support up to 128GiB sectors on 32-bit systems (verification only). This is enough for now.

More detailed context here: #641 (comment)

Acceptance criteria

Risks + pitfalls

Where to begin

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

No branches or pull requests

3 participants