Mike Dilger on Nostr: I'm not sure of your API can you verify that this will work (it compiles): 1) ...
I'm not sure of your API can you verify that this will work (it compiles):
1) Generate events from the filter, and convert into `Item`s, inserted into `NegentropyStorageVector`. [BUT I copied your NegentropyStorageVector and implemented `NegentropyStorageBase` for &NegentropyStorageVector to not consume it].
2) Store in a global HashMap under the subscription ID.
3) Look it up again immediately to get a `&NegentropyStorageVector` and build a `Negentropy` on it.
4) `reconcile()` the incoming bytes to get the outgoing bytes.
5) Next NEG-MSG, just start at step (3)
Also I deployed this at wss://chorus.mikedilger.com:444 but I don't have any tools for testing it. If anybody could easily check if negentropy is working there, that would be great. Otherwise I'll have to write some tool.
Published at
2025-01-19 19:50:46Event JSON
{
"id": "5f91d81d55f9fde8a748b4cd9f153aeeb2786c6abbecaef37c3e816a4ebb1ef3",
"pubkey": "ee11a5dff40c19a555f41fe42b48f00e618c91225622ae37b6c2bb67b76c4e49",
"created_at": 1737316246,
"kind": 1,
"tags": [
[
"p",
"68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272"
],
[
"e",
"a8d494544187f21a5dac822869d4cc3307b93436f3b560aa2ecc8505942418c7",
"wss://nostrue.com/",
"root"
],
[
"e",
"babc9bca24d5d3b509b84ef8716b9aa9972e93a111388bf423ae0b8110835bf9",
"wss://nostrue.com/",
"reply",
"68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272"
]
],
"content": "I'm not sure of your API can you verify that this will work (it compiles):\n\n1) Generate events from the filter, and convert into `Item`s, inserted into `NegentropyStorageVector`. [BUT I copied your NegentropyStorageVector and implemented `NegentropyStorageBase` for \u0026NegentropyStorageVector to not consume it].\n2) Store in a global HashMap under the subscription ID.\n3) Look it up again immediately to get a `\u0026NegentropyStorageVector` and build a `Negentropy` on it.\n4) `reconcile()` the incoming bytes to get the outgoing bytes.\n5) Next NEG-MSG, just start at step (3)\n\nAlso I deployed this at wss://chorus.mikedilger.com:444 but I don't have any tools for testing it. If anybody could easily check if negentropy is working there, that would be great. Otherwise I'll have to write some tool.",
"sig": "6d2667a41eafd9162abd47882a0d59d2a631bfcf1d9844c8154acbd79a48460cde1e441208564639613c5327a03359de8325397d1c0cfd3869e6829e9d5343ae"
}