Anthony Accioly on Nostr: Hi greenart7c3, I’m sorry to bother you, but I’ve just confirmed that Citrine is ...
Hi greenart7c3 (nprofile…fpck), I’m sorry to bother you, but I’ve just confirmed that Citrine is also experiencing the “store more than one replaceable event per kind and pubkey” issue as described by Vitor Pamplona (nprofile…deau) below.
I have the delete events option enabled, but Citrine is still returning more than one kind 10002 event for my pubkey.
Since folks may not want to open Citrine to the internet, I wrote a quick script with `nostr-tools` (sorry, I’m not a JavaScript person at all) to reproduce the problem below. Just replace the IP address and pubkey. My local Citrine instance is currently storing and returning several different kind 10002 events for my pubkey.
```javascript
import WebSocket from 'ws'
import { Relay, useWebSocketImplementation } from 'nostr-tools/relay'
useWebSocketImplementation(WebSocket);
const relay = await Relay.connect('ws://192.168.1.1:4869');
console.log(`connected to ${relay.url}`)
const pk = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
let eventCount = 0
relay.subscribe([
{
kinds: [10002],
authors: [pk],
},
], {
onevent(event) {
console.log('got event:', event)
eventCount++
},
oneose() {
console.log('Got', eventCount, 'events')
relay.close()
}
})
```
Could you please have a look when you have a chance?
👨💻 utxo 👨💻 (nprofile…x66a) and fiatjaf (nprofile…c9z9) are also currently working on fixing this in HAVEN + katru.
#devstr
quoting nevent1q…j7sqohhh I just logged into your relay and it sent ALL the past versions of your own 10002 events. There are 44 10002 events coming down to Amethyst just for yourself. For each one of the 43 outdated events, Amethyst replies with the new one.
👨💻 utxo 👨💻 (nprofile…x66a) something is wrong with haven's replaceable code. A filter by kind 10002 should only return the latest event, not all versions.
You can test it here: https://lightningk0ala.github.io/nostr-wtf/query
with filter: [{"kinds": [10002]}]
I have the delete events option enabled, but Citrine is still returning more than one kind 10002 event for my pubkey.
Since folks may not want to open Citrine to the internet, I wrote a quick script with `nostr-tools` (sorry, I’m not a JavaScript person at all) to reproduce the problem below. Just replace the IP address and pubkey. My local Citrine instance is currently storing and returning several different kind 10002 events for my pubkey.
```javascript
import WebSocket from 'ws'
import { Relay, useWebSocketImplementation } from 'nostr-tools/relay'
useWebSocketImplementation(WebSocket);
const relay = await Relay.connect('ws://192.168.1.1:4869');
console.log(`connected to ${relay.url}`)
const pk = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
let eventCount = 0
relay.subscribe([
{
kinds: [10002],
authors: [pk],
},
], {
onevent(event) {
console.log('got event:', event)
eventCount++
},
oneose() {
console.log('Got', eventCount, 'events')
relay.close()
}
})
```
Could you please have a look when you have a chance?
👨💻 utxo 👨💻 (nprofile…x66a) and fiatjaf (nprofile…c9z9) are also currently working on fixing this in HAVEN + katru.
#devstr