-
Notifications
You must be signed in to change notification settings - Fork 25
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
bug: nanoseconds #310
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
## [9.1.0](v9.0.0...v9.1.0) (2024-04-02) ### Features * change default TTL and add support for custom TTL ([#1](#1)) ([#308](#308)) ([d647529](d647529)), closes [/specs.ipfs.tech/ipns/ipns-record/#ttl-uint64](https://github.com/ipfs//specs.ipfs.tech/ipns/ipns-record//issues/ttl-uint64) [#310](#310) ### Trivial Changes * add or force update .github/workflows/js-test-and-release.yml ([#311](#311)) ([0c5f3e1](0c5f3e1)) * add or force update .github/workflows/js-test-and-release.yml ([#312](#312)) ([46a2b72](46a2b72)) * add or force update .github/workflows/js-test-and-release.yml ([#313](#313)) ([e933496](e933496)) * Update .github/workflows/stale.yml [skip ci] ([16e0e10](16e0e10))
Nanoseconds are calculated incorrectly. See ipfs/helia-verified-fetch#19 (comment) for more details. Basically,
Some proofs (copy and paste into dev console):
1e9
, or "One billionth of one second".BigInt(1)/*<s>*/ * BigInt(1e9)/*<ns>*/ === (1000000000n)/*<ns>*/ /* 1,000,000,000/*<ns>*/
1000000000/*<ns>*/ * 1e-9/*<ns-to-s>*/ === 1
BigInt(1)/*<s>*/ * BigInt(1e6)/*<ms>*/ === 1000000n/*<ms>*/ /* === 1,000,000/*<ms>*/
1000000/*<ms>*/ * 1e-6/*<ms-to-s>*/ === 1
1e6
or "One millionth of one millisecond"BigInt(1)/*<ms>*/ * BigInt(1e6)/*<ns>*/ === 1000000n/*<ns>*/ /* === 1,000,000/*<ms>*/
1000000/*<ns>*/ * 1e-6/*<ns-to-ms>*/ === 1
js-ipns/src/index.ts
Line 171 in 16e0e10
references:
The text was updated successfully, but these errors were encountered: