Commit Graph

104 Commits

Author SHA1 Message Date
Vitor Pamplona
c4653b147c Adds new benchmark cases 2025-10-20 17:10:08 -04:00
Vitor Pamplona
7994945209 30% Faster isHex for strings with 64 bytes. 2025-10-03 15:58:01 -04:00
Vitor Pamplona
7a280a3cde - Migrates Quartz from Android to CommonMain
- Fully converts OpenTimestamp Java codebase to Kotlin, migrating the sync and async HTTP call interfaces to OkHttp and coroutines
- Redesigns parsing of relay commands, messages and filters for performance in Jackson.
- Starts the use of KotlinX Serialization when speed is not a requirement
- Migrates all Jackson field annotations to Kotlin Serialization
- Migrates Regex use in Quarts to Kotlin's Regex class
- Migrates Base64 from Android to Kotlin
- Migrates UUID from Android/Java to Kotlin
- Migrates LRUCache usage from Android/Java to Kotlin collections
- Migrates all String to bytearray conversions to Kotlin methods
- Migrates all System.arraycopy calls to kotlin native ones.
- Separates parsing code from the data classes Companion objects
- Exposes Rfc3986 normalizations to each platform.
- Exposes URI parsing classes to each platform.
- Exposes URL Encoders to each platform.
- Exposes BigDecimal to each platform.
- Exposes the Url Detector to each platform.
- Exposes MacInstances to each platform
- Exposes Diggest instances to each platform.
- Exposes a BitSet to each platform.
- Exposes GZip to each platform.
- Exposes Secp256k1 to each platform.
- Exposes SecureRandom to each platform.
- Exposes Time in seconds to each platform.
- Exposes the LargeCache to each platform.
- Exposes AES CBC and AES GCM encryption/decryption to each platform
- Migrate test assertions to Kotlin Tests
- Exposes Address class to each platform because of the Parceleable
- Creates our own ByteArrayOutputStream.
- Removes Lock features inside the Bloomfilters because we don't need data consistency/
- Migrates UserMetadata parser from Jackson to Kotlin serialization
- Removes the need for Static methods in each tag.
- Adds an event template serializer
- Adds KotlinX Datetime to migrate some of the date-based logs
- Adds support for LibSodium in the JVM platform
- Creates a shared test build for iOS targets
- Fixes several usages of Reflection when serializing classes
- Fixes a bug on loading RelayDB for the HintBloom filter test
- Increases the Bloom filter space to better use hints in the app.
- Removes support for iOS in x86
- Creates a Jackson mapper just for NIP-55, which stays in the Android build only.
- Keeps the event store in the android build as well.
- Removes @Syncronized tags in favor of Mutexes.
- Improved sendAndWaitForResponse NostrClient method to properly account for returns from each relay.
- Removes the need for GlobalScope and async calls in the downloadFirstEvent method.
- Restructures the parser and serialization of the relay messages and commands for performance with Jackson
- Removes the dependency on Jackson's error classes across the codebase.
- Moves the hint to quote tag extension methods to their own packages.
- Speeds up the generation of Bech32 addresses
- Migrates NIP-6 and Blossom uploads to use Kotlin Serialization
2025-09-22 19:44:51 -04:00
Vitor Pamplona
faffe2a936 About 30-40% event hashing performance boost 2025-09-17 08:40:06 -04:00
Vitor Pamplona
83e87c2cf4 Adds an event id hash check that doesn't create a separate bytearray to compare between the incoming hex from the relay and the recalculated byte array from SHA256. 2025-09-17 08:40:06 -04:00
Vitor Pamplona
cd0b1b65fb Merge expanding and checking Hmac functions to avoid re-creating the Mac instance. 2025-09-15 17:25:36 -04:00
Vitor Pamplona
239cac430e Adds a test for native vs libsodium chacha20 2025-09-15 16:15:07 -04:00
Vitor Pamplona
cb5299e265 Simple refactoring 2025-09-15 16:14:09 -04:00
Vitor Pamplona
98aaef61c7 Faster Hkdf functions with less array copying and allocations (which can be impactful if the ciphertext is large) 2025-09-15 15:15:44 -04:00
Vitor Pamplona
689066fd44 Benchmark for NIP-44 operations 2025-09-15 12:29:26 -04:00
davotoula
8fffe3f662 remove unused imports 2025-08-30 09:10:28 +01:00
Vitor Pamplona
56d8a83ebe Fixing a parser benchmark 2025-08-28 08:55:15 -04:00
Vitor Pamplona
170b6cfe69 Moves test assets to resources to make it work with kmp 2025-08-27 21:09:21 -04:00
Vitor Pamplona
726f9e2f4f Moves target compatibility to java 21 2025-08-06 14:07:51 -04:00
Vitor Pamplona
7ba2810423 Quick event store using SQLite directly. 2025-07-28 16:49:39 -04:00
Vitor Pamplona
a59fe59657 Sending eventDB companion to avoid recreating it all the time 2025-07-27 16:52:28 -04:00
Vitor Pamplona
3a37d5e42d Fixes the benchmark testing cases 2025-07-25 14:29:14 -04:00
Vitor Pamplona
25e92666e0 Adjusts the gradle DSL language to the latest deprecations 2025-07-24 09:53:00 -04:00
Vitor Pamplona
58e353fb40 Moves NIP-55 calls to be suspending functions.
Moves NIP-55 calls to include an ID per call, not per event.
Adds error handling facilities to the Signer functions.
Moves the indexing of the decrypted objects to outside the LocalCache
Migrates Signers to become suspending functions.
Migrates Decryption caching systems to outside the Events themselves.
Migrates all NIP-51 lists to the new structure.
Migrates Drafts and NIP-04 and NIP-17 DMs to the new structure
Migrates Bookmarks to the new structure.
Changes the Room route to avoid using hashcode.
2025-07-18 17:17:27 -04:00
Vitor Pamplona
f93b08a272 Refactors master serializer name from EventMapper to JsonMapper 2025-07-11 17:10:51 -04:00
Vitor Pamplona
0cfcfaf899 3rd large migration to outbox. 2025-07-01 20:38:18 -04:00
Vitor Pamplona
d35e3f8daf Removing deprecated functions 2025-05-16 14:11:12 -04:00
Vitor Pamplona
b045d0e122 Migrates lint to the newer default version and copyright to 2025 2025-05-14 11:59:15 -04:00
Vitor Pamplona
63a009f36d - Adds support for Ephemeral Chats from coolr.chat
- Adds support for following ephemeral chats
- Adds support for live events at the top of the feed.
- Adds support for NIP-51, kind:10005 public chat lists
- Adds support for Channel feeds
- Moves following of NIP-28 chats from the Contact List to kind: 10005
- Disables following of events at the Contact list
- Improves gallery display to slightly override profile pictures when in list
- Starts the Account refactoring by moving custom Emoji, EphemeralList and PublicChat lists to their own packages
- Refactors NIP-51 lists to use common classes of private tags instead of general list classes.
- Starts to separate all Public chats into their own database.
- Removes old account upgrades from the local storage
- Refactors url NIP-11 loading and unifies icon
- Reduces the dependency of Relay classes in the LocalCache, Notes and User classes
2025-05-02 21:18:10 -04:00
Vitor Pamplona
a2d9f31a8a Assigning hints to NIPs until NIP-53
Speeding up Bech32 and Hex processing
Updating Boosts and Reposts to the new way of declaring tags
Renaming the SHA256 hash tag from NIP94 to not confuse with # hashtags
2025-02-24 17:09:08 -05:00
Vitor Pamplona
84a52a1ce0 Speeding MurMur up
Adding more test cases
Mapping out memory used by filter
2025-02-20 17:10:24 -05:00
Vitor Pamplona
aaf86bf53e Adds a Bloom-based hint indexer with MurMur hash 2025-02-20 14:07:10 -05:00
Vitor Pamplona
af29133272 Simplifies the benchmark for PoW 2025-02-18 19:00:05 -05:00
Vitor Pamplona
9689acb5f3 Deletes experimental serializer on NIP-01
Moves classes to the appropriate packages on NIP-01
Adds a PoW miner to quartz.
Adds a PoW commit evaluator as a bytearray of the ID
2025-02-18 17:47:34 -05:00
Vitor Pamplona
8720b00d4f Separates the random benchmark from the Sign/Verify benchmarks 2025-02-18 10:19:51 -05:00
Vitor Pamplona
9c35008fc4 Moves Sha256 to a pool of digests to double the hashing performance 2025-02-18 09:40:17 -05:00
Vitor Pamplona
6d9964a1cb Decoupling NIP01 methods from CryptoUtils
Decoupling Encryption and Decryptions from CryptoUtils
Decoupling live instances of JNI bindings for Secp and LibSodium from CryptoUtils
Decoupling key cache from CryptoUtils
Reorganizes NIP-04 to match new package structure
Adjusts test structures to match
2025-02-17 19:13:05 -05:00
Vitor Pamplona
9c21a8a7da Massive refactoring of Quartz to:
- Define each tag in their own class.
- Allow extension functions to additional responsibilities to other classes
- Migrate from hardcoded tag filters in events to the Tag's parser and assemble functions.
- Migrate hardcoded event.create to builders that use extension functions
- Restructures threading infrastructure for NIP-10
- Decouple the event signing from the Event building functions via event templates
- Create classes to represent Tags and TagArrays and use extension functions to add domain-related methods to the tag array of each nip.
- Uses external functions on event template builders to better point to which functions and which tags can be used in which event kinds.
- Separates Event kinds in packages inside each nip.
- Improves support for NIP-89
- Correctly establishes which imeta params can be used in each nip (video, picture, files)
- Decouples the iMeta builder from any nip.
- Fixes mute list word and user removal when inserted from a different client.
- Migrates the Account class to avoiding having to build each Event inside of it
2025-02-13 17:39:13 -05:00
Vitor Pamplona
f3b049382e Renames Gossip to Rumor to match names on the NIP-59 2025-01-15 08:58:08 -05:00
Vitor Pamplona
e36e49cc88 Breakes the Command and Message parsers out of the Relay class 2025-01-14 11:47:52 -05:00
Vitor Pamplona
d66e8d4cde refactoring android tests to match refactoring of package names
moving some nip96 stuff to quartz
2025-01-13 12:20:02 -05:00
Vitor Pamplona
d2b731e372 Massive refactoring of quartz to prepare for nip-based packages. 2025-01-13 10:38:45 -05:00
Vitor Pamplona
1430ba4745 Moves Event ID hashing to a new class 2025-01-06 15:13:14 -05:00
Vitor Pamplona
5f577df819 Refactors SHA-256 methods to its own class 2025-01-06 12:56:57 -05:00
Vitor Pamplona
579f63935a - Adds support for multiple media uploads at the same time.
- Adds support to display PictureEvents with multiple images at the same time
- Improves Uploading feedback for the NewPost screen
- 10x better performance on Blurhash generation
- Fixes cosine caching on Blurhash
- Removes troublesome dependency on blurhash encoder liberary
- Restructures contentScale for Images and Video dialogs
- Refactors Media Uploaders to improve code reuse
- Refactors iMeta usage on Quartz to move away from NIP-94
2024-12-18 16:52:50 -05:00
Vitor Pamplona
b9883093ac Improving performance of the Hex encoder. 2024-12-03 14:07:13 -05:00
Vitor Pamplona
d8d6736d55 Caches OTS web calls to avoid pinging the server repeatedly for the same event. 2024-09-26 13:45:01 -04:00
Vitor Pamplona
71b45b96fb Adds event factory performance test 2024-08-06 11:04:30 -04:00
Vitor Pamplona
b360c3292f removes unnecessary minification for benchmark's debug flavor 2024-07-09 10:45:51 -04:00
Vitor Pamplona
349d6cfc22 Migrates sdk requirements to the version catalog. 2024-07-03 13:49:18 -04:00
Vitor Pamplona
8d88efd27b Migrating Lint to 1.3.1 2024-07-03 11:06:02 -04:00
Vitor Pamplona
692f7c4270 Upgrades to Kotlin 2.0.0 2024-07-03 11:00:45 -04:00
Vitor Pamplona
a8a2bda9af rearranges the crypto package into separate nips and reduces the amount of circular dependencies. 2024-06-25 12:13:17 -04:00
greenart7c3
6eb0f153fa fix build 2024-06-24 07:36:11 -03:00
Vitor Pamplona
b785e0d505 Removes old Robohash 2024-06-11 18:17:51 -04:00