kouhai

✨ magical girls ✨

the lightly-fictionalized account of a club of magical girl kouhais… and the sparkling senpais they chase


activitypub? mastodon? what?
social.treehouse.systems/@kouhai

lexi
@lexi

so a friend of mine sent me a tweet. it looked like this: twitter.com/_/status/xxxxxxxxxxxx9280000

and the conversation went like this:

lexi: damn that tweet has a lot of trailing zeroes

[Replying to lexi: damn that tweet has a lot of trailing zeroes]
lexi: oh no
lexi: oh god oh fuck

if you're a math nerd you can probably guess where this is going. if not, please watch But how does bitcoin actually work? by 3b1b

but yeah.

you can build a centralized proof-of-work blockchain on twitter.

not linking it to twitter in some form, but actually running the fucking blockchain on twitters infrastructure by using tweets as blocks and tweeting as mining. i am not fucking joking

instead of using sha256 hashes you can use the much more eco-friendly twitter backend. it wouldn't require proof of GPU work, but proof of time (and proof of credentials) because the api is rate limited and fuck twitter, i dont pay the server bills lol

the proof is super simple: your tweets get an ID. and ~22 of those bits are more or less out of your control (worker ID and sequence number). you get n trailing zeroes, you get the block. you could also introduce threads [as in chained twitter replies by one person, not cpu workloads] to exponentially increase the necessary work if more than like 1k people mine on twitter, so even some bad RNG isnt a problem here.

you can link to previous blocks by literally just linking to another tweet. and you could automatically backup all successfully mined blocks on an internet archive (wouldnt cost them a lot of bandwidth bc only a tiny fraction of all tweets need to get archived) and you literally have a stable (but more or less centralized) blockchain.

you could genuinely just rip off most of the original bitcoin implementation and implement it with twitter as the underlying blockchain infrastructure.

this is so incredibly cursed. i should not be allowed to be on the internet


Xylaria
@Xylaria

This is comically cursed.

...in theory, could you do this with any system that has postID built out like Twitter's? Could we blockchain Discord messages? Run a cryptocurrency on Slack? What are the limits here?


kouhai
@kouhai

basically, tweet ids have several components. timestamp, instance, and sequence.

these fit in differently-sized parts of the ID:

  • timestamp: 41 bits
  • instance: 10 bits
  • sequence: 12 bits

so for a tweet id ending in four zeroes, you'd need a specific value for the last 2^14 bits (since 2^14 = 16384, and assuming my math + logic's correct)

this depends on various factors, though, and lunch break's over, so I'm not going to do this math right now


You must log in to comment.

in reply to @lexi's post:

One of my favorite activities on the rare occasions that crypto-types want to talk to me is listen very carefully to what they say, and then choose one of two questions to ask them.

  • So...it's a linked list?
  • So...your high-tech money that will be a force for equality gives money to whoever can afford to waste the most CPU cycles?

And then continue until they walk away wondering who they are. Which is all to say, Twitcoin!

i love this idea for one very specific reason.

If this actually got adopted by cryptobros who then try to mine as much as possible to gain as much profit as possible, I imagine it’d eventually become too much for the poor servers at Twitter to handle and we might actually see the end of the platform

in reply to @Xylaria's post:

basically the two requirements are that

a) the history (or at least a chunk of it) has to be public and b) you need some proof of validity (like proof of work or proof of stake) to prevent bad actors from forging messages on the chain (for example manipulating a ledger).

(note i am not a crypto expert, this may be wrong, but i think that this is enough to build a more or less stable public blockchain)

discord messages are private, but you might be able to run a blockchain on discords attachment CDN, the problem is just that less random (aka more sequential) id systems require more bytes, and doing it on a timestamp-based thing (it appears like discord does some shenanigans like that?) requires more requests -> faster ratelimiting -> worse mining

in reply to @kouhai's post:

yep, i looked into this a bit, and it is more or less random. you can put some work into it (see the bad rng link in my post), but it is more or less random as in you cant do much to influence it. also, even if you can generate tweets with a bunch of leading zeroes with a non-100% chance a good PoW blockchain auto-adjusts the number of required zeroes, and with the mentioned threading technique you can exponentially add more difficulty to the PoW task, so you can build a semi-stable system either way, even if the RNG is shit

also i am a crypto(graphy) nerd and i am genuinely considering building this for the shits and giggles, and it would basically be a bitcoin ripoff, and that shows that blockchains work even with moores law, so it should also work with a bad RNG that can scale basically infinitely

okay looked into it a bit more. turns out that the datacenter id is pretty much unusable because there are some kind of regional pools so if we're a bit unlucky only people in like australia or something will ever mine anything and if we're pretty unlucky no datacenter has the id 0 and nobody will ever be able to mine anything. looks like the current meta is something like TS%10+SEQ because that seems pretty random and can actually be zero, and with more than like two miners we need threads but thats doable

also i am very tired and completely forgot that you could also just hash the whole tweet id via sha256 a la bitcoin and use leading zeroes of the digest, just like bitcoin, and start with a much lower network difficulty lol