Commit Graph

81 Commits

Author SHA1 Message Date
Vitor Pamplona 09eeebba94 Keeps the hasher cache on the seed module 2025-12-24 15:28:59 -05:00
Vitor Pamplona f1298c3133 Removes event id from the deletion module insert 2025-12-24 15:27:38 -05:00
Vitor Pamplona ff48af5090 Adds a pTagHash utility to the hasher 2025-12-24 15:25:27 -05:00
Vitor Pamplona 01ea413afd Faster SQLLite DB with probabilistic hashvalues 2025-12-22 15:18:59 -05:00
Vitor Pamplona e4f3a56851 Removes the Statement cache since statements are not thread safe 2025-12-20 12:25:16 -05:00
Vitor Pamplona 7e65f1afa7 Fixes the Imodule dependency 2025-12-19 17:45:31 -05:00
Vitor Pamplona fde5d57b16 Faster parseResult array builder 2025-12-18 12:08:05 -05:00
Vitor Pamplona 12beeea8ee Adds a module interface for the SQL Lite db with drop functions too 2025-12-18 12:01:17 -05:00
Vitor Pamplona 9069b11036 small refactoring 2025-12-16 18:03:26 -05:00
Vitor Pamplona eef3f42d3f Creating interfaces for multiple EventStores 2025-12-16 08:31:17 -05:00
Vitor Pamplona aa9ac205c1 deletes Db after tests 2025-12-15 22:04:20 -05:00
Vitor Pamplona 39eed5d85a reformatting 2025-12-11 17:09:03 -05:00
Vitor Pamplona ee972cff35 reverts db deletions to avoid conflicts with the open file 2025-12-09 18:02:26 -05:00
Vitor Pamplona d0efe26ce7 Offers support for external transactions
Offers support for indexing strategies for tags
2025-12-09 17:28:33 -05:00
Vitor Pamplona f4a0cd5af3 The number of params varies but a good limit seems to be 1000. This breaks the tag insert into many 1000 param inserts 2025-12-09 09:20:17 -05:00
Vitor Pamplona e44322adaa Speeds up db deletions 2025-12-09 09:05:37 -05:00
greenart7c3 7c4ad3abb7 Fix default permissions 2025-11-28 05:43:52 -03:00
Vitor Pamplona 8c3ab80e47 More correctly parses null and default values from NIP-55 using Jackson 2025-11-11 14:00:17 -05:00
Vitor Pamplona 948180157f pushes exception upward if triggered 2025-11-07 17:37:34 -05:00
Vitor Pamplona 6ccec0681a Marks address as stable 2025-11-07 17:23:53 -05:00
davotoula c3c75b46a7 optimise imports 2025-10-30 19:20:02 +01:00
greenart7c3 fb7610cafd Fix DecryptZapRequest CommandType 2025-10-29 14:38:54 -03:00
Vitor Pamplona bf664ea0c5 Avoids interning of large strings and objects where the duplication is not common 2025-10-28 12:18:19 -04:00
Vitor Pamplona 39f3aef7b5 Don't intern signatures, content and tags since they are not usually duplicated 2025-10-28 12:11:34 -04:00
Vitor Pamplona a6e4a8d4fc Performance improvement for the address serializer. 2025-10-06 18:05:03 -04:00
greenart7c3 6391ddbbaa Show a dialog to select a signer when using multiple signers 2025-09-24 09:09:51 -03: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 c375fa0ab8 Adds another catch to get object errors when parsing NIP-28 metadata 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 eaf8cb3384 Don't check for the max size in string anymore 2025-09-15 17:25:47 -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 e329b096ba Moves the message key to the HKDF function 2025-09-15 16:21:11 -04:00
Vitor Pamplona 239cac430e Adds a test for native vs libsodium chacha20 2025-09-15 16:15:07 -04:00
Vitor Pamplona 24a5750155 Generalizes fixed key setup 2025-09-15 16:14:43 -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 bd70058f78 Avoids creating a byte array and recreating it again inside of the Mac instance. 2025-09-15 12:30:56 -04:00
Vitor Pamplona 67f9557081 Reduces the need to keep the memory for checking the Mac and decrypting at the same time, allowing the GC to run after the check was correct. 2025-09-15 12:30:26 -04:00
Vitor Pamplona 7616d01166 Implements NIP-44 extension for bigger payloads https://github.com/nostr-protocol/nips/pull/1907 2025-09-15 11:58:43 -04:00
Vitor Pamplona 46fec1d480 Adds a payment failed enum 2025-09-12 14:24:11 -04:00
Vitor Pamplona ac48705980 Fixes showing blog posts in the future 2025-09-12 12:39:12 -04:00
Vitor Pamplona 0886af4386 Migrates memory counters from Long to Int 2025-09-12 11:11:16 -04:00
Vitor Pamplona 35a123a185 No need for this log 2025-09-11 18:53:03 -04:00
Vitor Pamplona 1f8d0295d5 - Separates Application dependencies into an AppModules class to create only after the OnCreate event.
- Switches TorSettings to be per Application and not per Account anymore
- Since TorSettings is now global, moves the okHttpClient determinations out of the Account-based classes into the Application.
- Since TorSettings is now global, set's up Coil's image loader only once when creating the Application
- Moves UISettings state to App Modules instead of viewmodel
- Migrates TorSettings and UISettings to DataStore
- Accounts now have their own coroutine scopes to allow cancellation when they are unloaded/logged off
- New tor evaluator service for relay connections now uses all account's trusted relays and dm relays at the same time.
- Migrates composable-state-based UISettings to Flow-based UI settings, while observing connectivity status
- Removes the displayFeatures and windowSizeClass from the shared model
- Fixes not requesting Notification Permissions for APIs older than Tiramisu in the FDroid flavor
- Moves the NIP-11 document cache from singleton to the App Modules
- Avoids using AccountViewModel to check NIP-11 Relay documents
- Moves the UI Settings usage in composables to functions that do not observe the state since they don't need to refresh the screen when changed.
- Refactors UI Settings screen to separate components and remove the sharedViewModel
- Only starts Internal Tor if that option is selected in the TorSettings.
- Turn TorSettings into a data class to observe changes to it
- Drops the SharedPreferences ViewModel to use UISettingsFlow directly from App Modules
- Reorganizes OTS Events after simplification of the OkHttp based on TorSettings.
2025-09-11 18:04:10 -04:00
Vitor Pamplona 11597d2448 Documents OTS methods 2025-09-11 10:45:35 -04:00
Vitor Pamplona 5c3ea0a302 removes duplicated copyright notice 2025-09-11 10:45:18 -04:00
Vitor Pamplona 0c65176ecc Adds a DefaultOtsResolver builder using the internal web request classes from java. 2025-09-11 10:45:02 -04:00
Vitor Pamplona eac2e54953 Merge pull request #1467 from davotoula/prevent-resource-leaks-with-streams
Prevent resource leaks with streams
2025-09-08 17:27:47 -04:00
Vitor Pamplona 95cf3fb6eb Changing the DVM feed to sort by follows that liked or zapped the DVM 2025-09-08 16:49:30 -04:00
Vitor Pamplona ac2609b4f6 Finish migration to INostrClient 2025-09-08 15:45:50 -04:00