Skip to content

Fix: Update BitChatDuplicateCache to use uint64_t senderId#10

Open
a1denvalu3 wants to merge 2 commits into
evansmj:feature/bitchat-pluginfrom
a1denvalu3:fix/bitchat-senderid-cache
Open

Fix: Update BitChatDuplicateCache to use uint64_t senderId#10
a1denvalu3 wants to merge 2 commits into
evansmj:feature/bitchat-pluginfrom
a1denvalu3:fix/bitchat-senderid-cache

Conversation

@a1denvalu3
Copy link
Copy Markdown

This PR fixes a bug introduced in the previous version update where senderId was updated to uint64_t in the protocol but remained uint32_t in the BitChatDuplicateCache structure.

This mismatch caused the duplicate check to fail for sender IDs larger than 32 bits due to truncation during the cache check. This resulted in the cache consistently reporting 'false' (not a duplicate) for these messages, leading to message loops and repeated broadcasts (echoes) as observed in issue comments.

Fixes loop reported in #2 (comment)

@a1denvalu3
Copy link
Copy Markdown
Author

@evansmj At some point in the future we might also consider making the duplicate cache a GCS filter, like on bitchat-android and bitchat-swift

@a1denvalu3 a1denvalu3 marked this pull request as draft January 20, 2026 12:15
@a1denvalu3 a1denvalu3 force-pushed the fix/bitchat-senderid-cache branch from dba31b8 to 58a968d Compare January 20, 2026 12:17
@a1denvalu3 a1denvalu3 marked this pull request as ready for review January 20, 2026 12:23
@a1denvalu3
Copy link
Copy Markdown
Author

@evansmj What does the mesh topology look like for you? For me only one device manages to connect to both meshtastic devices.
Screenshot_20260120-140501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant