mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-02 05:43:08 +00:00
* fix!: avoid SDS lamport timestamp overflow The SDS timestamp is initialized to the current time in milliseconds, which is a 13 digits value (e.g. 1,759,223,090,052). The maximum value for int32 is 2,147,483,647 (10 digits), which is clearly less than the timestamp. Maximum value for uint32 is 4,294,967,295 (10 digits), which does not help with ms timestamp. uint64 is BigInt in JavaScript, so best to be avoided unless strictly necessary as it creates complexity. max uint64 is 18,446,744,073,709,551,615 (20 digits). Using seconds instead of milliseconds would enable usage of uint32 valid until the year 2106. The lamport timestamp is only initialized to current time for a new channel. The only scenario is when a user comes in a channel, and thinks it's new (did not get previous messages), and then starts sending messages. Meaning that there may be an initial timestamp conflict until the logs are consolidated, which is already handled by the protocol. * change lamportTimestamp to uint64 in protobuf * lamport timestamp remains close to current time
js-waku
A TypeScript implementation of the Waku v2 protocol.
Documentation
API Documentation can also be generated locally:
git clone https://github.com/waku-org/js-waku.git
cd js-waku
npm install
npm run doc
Bugs, Questions & Features
If you encounter any bug or would like to propose new features, feel free to open an issue.
For general discussion, get help or latest news, join us on Vac Discord or the Waku Telegram Group.
Roadmap
You can track progress on the project board.
Contributing
See CONTRIBUTING.md.
License
Licensed and distributed under either of
- MIT license: LICENSE-MIT or http://opensource.org/licenses/MIT
or
- Apache License, Version 2.0, (LICENSE-APACHE-v2 or http://www.apache.org/licenses/LICENSE-2.0)
at your option. These files may not be copied, modified, or distributed except according to those terms.
Description
Languages
TypeScript
95.1%
JavaScript
4.6%
Dockerfile
0.1%
Shell
0.1%