Avatar
Jem
8366029071b385def2e4fb964d2d73e6f4246131ac1ff7608bbcb1971c5081d2
Bitcoin ⚡ engineering @ CashApp
Replying to Avatar Blake

It’s deceptively complex to do it optimally - but good enough works ok too. Which relays you receive from differs, even by kinds you want, and publishing is similar complex.

Not sure if helpful, but a dump of my notes below around relay selection. Trying to end up with a diagram and list of functions that explain what logic to apply when and how to pick and prioritise relays.

Paid relays, rate limiting, kind, destination pubkeys, your preferences, relay hints, proof of work, parent events, mentioned pubkeys, etc — all can factor in. Relay health/connectivity.

——

getBestOutboundRelayForEvent

(Note: A paid relay filter should apply unless you have paid)

Kind 0/3/10_002

Maximally broadcast

Publish to Metadata Indexer Relays

Note (without reply or mention)

Do you want to maximally target your followers?

Do you want to maximally broadcast?

Reaction

Include parent relay hints (if provided)

getBestOutboundRelayForPubkey(author)

Repost

Include parent relay hints (if provided)

getBestOutboundRelayForPubkey(author)

Do you want to maximally target your followers?

Do you want to maximally broadcast?

Reply

Include parent relay hints (if provided)

getBestOutboundRelayForPubkey(author)

Do you want to maximally target your followers?

Do you want to maximally broadcast?

Reply + Mention

Include parent relay hints (if provided)

getBestOutboundRelayForPubkey(mention) for each mention

Mention

getBestOutboundRelayForPubkey(mention) for each mention

DM

getBestOutboundRelayForPubkey(recipient)

Event Report

? Broadcast or targeted relays ?

Long form Content

? Broadcast or targeted relays

(Nostr-connect)

?

(Zap Service Provider)

?

getBestOutboundRelayForPubkey

Kind 10_002

NIP05

Kind3 (or EOL?)

Fallback to my Publish/Write relays (as they can query them for lookup)

----------------------------

getBestQueryRelayForPubkey

getBestQueryRelayForEvent Id

If only an event Id is known.. Shotgun query / your read relays

getBestQueryRelayForEvent

Include event relay hints (if provided)

Check parent event (if known) relay hints

getBestQueryRelayForPubkey for each known thread participant

Other considerations

Min POW Required

Rate Limiting

This is a super interesting problem

Replying to Avatar Lyn Alden

Too many people have given Elon a pass. Don't give him a pass.

He's a marketer, not a founder or an engineer. He didn't found PayPal or Tesla; he bought into them early. He's good at selling narratives and equity valuation for perpetually unprofitable companies.

Everything for him is a narrative. His green revolution was a narrative to sell more cars and get more subsidies. His bitcoin purchase was to gain appeal among bitcoin/crypto people in a bull market. And he shilled doge like a dumbass. His SpaceX narrative is to get money from the government.

His rooftop solar thing was an outright scam; the technology isn't ready and went nowhere because of that. His full-self-driving-in-an-intermediate-term timeline was a scam, and is going nowhere because of that. He makes scams to draw people and capital in, because for him it's all about narratives and equity valuation.

And then he dug unproductive holes, suggested unproductive hyper-tubes, built meme flamethrowers, for what? It's a narrative, not a business. None of this is real productive shit to make peoples' lives better.

His latest "we need free speech" narrative was a scam too. He tapped into something real, which is what marketers do and why it kind of worked. Yes, we need free speech. Yes, Twitter had censorship issues. He saw that and jumped on it maliciously rather than productively.

But what did he replace it with? He replaced it with arbitrary journalist censorship about his private jet, arbitrary censorship of Substack, selective Twitter Files release, won't talk seriously about any of his China connections because Xi Jinping fucking owns him economically there like Jack Ma, has his balls firmly in his grasp, etc.

Elon's playing the narrative, the anti-woke meme of the day. He's a master meme-momentum-player. Don't fall for it.

Dang. This 🔥

Where can I follow the discussion around relay gossiping? #[0]​ recently mentioned that people have been talking about it, but nothing is set in stone.

Clearly the protocol wraps around the idea that messages themselves can recommend relays. e.g. a user profile contains their relay list & any event can include recommended relays when referencing other events and pubkeys.

My naive initial thought is that clients should

connect to a set of relays that give access to all the pubkeys you follow + all the relays you define as your own

when they see a new kind 0 profile clients should republish this to all the relays they are connected to (thereby propagating profiles eagerly)

Something like.

* Your profile's relay set {A, B, C}

* You follow alice, who has a relay set of {A, F, H}

* You also follow bob , who has a relay set of {E, F, G}

* At runtime, a client connects to {A, B, C, F} because you should always connect to your own set, plus you need to connect to something that knows about bob's events. We choose F because it's weighted higher for us, because alice also publishes there and we can get more redundancy.

When we see bob update their profile, we republish the new profile to every relay we're connected to so that more people know how to find bob. He would have written to {E, F, G} but with our help his profile is also in {A, B, C}

They rewrote the original ror app in Scala back when it was new hotness.

I remember seeing a tweet of just this many years ago. Tesla with a frunk full of miners just hanging foul at a charging station.

Yes. I listened to the podcast for quite a few episodes until recently. They've been talking nothing but AI for about 6 eps now.

Planning to check it out with the missus this Friday

Question about nip-19 bech32 encoding with prefix `note`: This is defined as being for event ids, but should it be applied to kind=1 notes only?

Can anyone point me to a discussion about kind 6 (repost) deprecation? What was the original NIP?

ピュアライフ 🤙

I don’t get the appeal of AI code generation. It automates the trivial and you still need to review it closely for bugs.

Elephant rock, Currumbin, Australia

I am too, but only because my wife wants access. :). I prefer and previously used https://www.passwordstore.org/