-
Notifications
You must be signed in to change notification settings - Fork 34
Bump to random-access-storage 3.0.0 and other deps #100
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
Conversation
On [random-access-storage](https://github.com/datrs/random-access-storage) issue datrs/random-access-storage#6 has changed all types from `usize` into `u64` to be able to handle more than 4gbs on 32bits systems. > usize is 32 bits on a 32 bit system, so the storage would be limited to 4GB on such a system. When changing `random-access-storage` on `hypercore` (tracking: datrs/hypercore#100) one of the things I've noticed is that it wold be easier to also make `flat-tree` use `u64` to integrate with `random-access-storage`. Very likely, this also means that we would need to bump to use more than 32Gb storages on `flat-tree`. I've simply changed all declarations of usize into u64. All tests are passing.
On [random-access-storage](https://github.com/datrs/random-access-storage) issue datrs/random-access-storage#6 has changed all types from `usize` into `u64` to be able to handle more than 4gbs on 32bits systems. > usize is 32 bits on a 32 bit system, so the storage would be limited to 4GB on such a system. When changing `random-access-storage` on `hypercore` (tracking: datrs/hypercore#100) one of the things I've noticed is that it wold be easier to also make `merkle-tree-stream` use `u64` to integrate with `random-access-storage`. Very likely, this also means that we would need to bump to use more than 32Gb storages on `merkle-tree-stream`. I've simply changed all declarations of usize into u64. All tests are passing. Needs: --- - [ ] datrs/flat-tree#44
|
@khernyo @substack Hi there, sorry to bother. I'm in the middle of the upgrade to random-access-storage using the new API using u64 instead of usizes, and I'm not sure if I'm doing it right. I'm reflecting the changes on the other libraries ( Should I avoid changing the other libs and just keep the casts on hypercore instead? I'll wait a bit on changing the other libs until I have some feedback here. |
On [random-access-storage](https://github.com/datrs/random-access-storage) issue datrs/random-access-storage#6 has changed all types from `usize` into `u64` to be able to handle more than 4gbs on 32bits systems. > usize is 32 bits on a 32 bit system, so the storage would be limited to 4GB on such a system. When changing `random-access-storage` on `hypercore` (tracking: datrs/hypercore#100) one of the things I've noticed is that it wold be easier to also make `tree-index` use `u64` to integrate with `random-access-storage`. Very likely, this also means that we would need to bump to use more than 32Gb storages on `tree-index`. I've simply changed all declarations of usize into u64. All tests are passing. It also fixes Travis CI and update libraries to latest version. Needs: --- - [ ] datrs/flat-tree#44
This commit compiles `hypercore` using the new u64 crates: - random-access-storage - random-access-disk - random-access-memmory - merkle-tree-stream - flat-tree - index-tree
|
I've got it to compile with the extra crates (except for bitfield) changed from I'm not sure how correct things are, and if the other crates also need to change, but it compiles now, and the tests passes. If someone could review it, and the other PRs on the other crates (specially if they are necessary), I would love that. |
|
Given that the API takes slices, I think it will also be limited by 32bits systems as well, from what I understood. Maybe it would be nice to ship the new version and have a setup test on a 32bit platform to find errors. What are relevant 32-bits platforms to keep testing? (Given that apple 32-bits has been lowered to second-tier) |
* Change from usize to u64 On [random-access-storage](https://github.com/datrs/random-access-storage) issue datrs/random-access-storage#6 has changed all types from `usize` into `u64` to be able to handle more than 4gbs on 32bits systems. > usize is 32 bits on a 32 bit system, so the storage would be limited to 4GB on such a system. When changing `random-access-storage` on `hypercore` (tracking: datrs/hypercore#100) one of the things I've noticed is that it wold be easier to also make `merkle-tree-stream` use `u64` to integrate with `random-access-storage`. Very likely, this also means that we would need to bump to use more than 32Gb storages on `merkle-tree-stream`. I've simply changed all declarations of usize into u64. All tests are passing. Needs: --- - [ ] datrs/flat-tree#44 * Fix travis
There are lots of things that will break.
Needs
Choose one: a 🙋 feature
Checklist
Context
Updating
random-access-storageto the latest version requires a lot of changes, as it changes the api from usize's to u64'sSemver Changes
minor (breaking, but below 1.0.0)