feat: mic moc#1182
Open
nugaon wants to merge 2 commits into
Open
Conversation
Implement Mined ID Chunk (MIC) and Mined Owner Chunk (MOC) messaging functionality with mining, sending, and subscription capabilities for both message types.
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for two new push messaging primitives in Swarm Bee: MIC (Mined ID Chunk) and MOC (Mined Owner Chunk). These enable targeted message delivery to specific overlay neighborhoods.
MOC (Mined Owner Chunk)
mocMine(targetOverlay, identifier, proximity): Mines an ephemeral private key such that the resulting SOC address lands in the target overlay's neighborhoodmocSend: Alias touploadSingleOwnerChunkfor sending messages; matched by identifier on receiving nodesmocSubscribe(identifier, handler): Receives all messages for a given identifier via WebSocketMIC (Mined ID Chunk)
micMine(targetOverlay, signer, proximity): Mines an identifier such that the SOC address lands in the target overlay's neighborhoodmicSend: Alias touploadSingleOwnerChunkfor sending messages; matched by owner on receiving nodesmicSubscribe(owner, handler): Receives all messages for a given owner via WebSocketKey implementation details:
crypto.getRandomValues()for secure random key/identifier generationactualProximity >= proximity)mocSendandmicSendare one-liner aliases touploadSingleOwnerChunk, eliminating wrapper overheadRelated Materials (Optional)
Related Bee feat PR: ethersphere/bee#5486