Mike Burr - log

[BT®][comp] Well, crypto addresses are numbers!

I've been learning about Bevy and via that about "ECS" which is some fascinating stuff if you've not come across it before. I think there's a flimsy word "reactive" being applied to this kind of thing. Whatever the case, it's a fundamentally different way of structuring programs. I won't explain it all here. That would be stupid.

It kind of stood out for me that an Entity is a kind of sphistocated struct that is mutable at runtime, which is only "extra steps" here because this is not Python. I'm pretty sure that mutating a struct that way with any number of possible components ("fields" sort of) at runtime all of which may be of any number of wacky types...

Getting back to the story, at its core an Entity is a struct that has a numeric ID. Whoopie.

But then I thought "hey, Ethereum is a number!" and so are Ethereum addresses for that matter.

You could have unique addressability of literally anythning your program calls "an entity", which covers a lot of ground (everything per the spec). Mind you of course they don't all need wallets. They're just numbers until they needed to participate in blockchain somehow.

And it occurs to me now: an Entity needs a numeric ID in order to exist. If you're at the point of creating it, you need to have the number handy. If you don't no spawn. Unless you're ok with just "a random valid etherum address". But that won't do you any good. Good luck creating a wallet with that address.

So maybe we have a fundamental law of the ethereum universe: If you don't have a wallet when you're born, good luck!

How is this different from just having a new component added as-needed wallet_address, say. There's not much benefits, maybe.

Except, when you say an entity must have a number, you're really saying. If we're going to use it, it needs an index, which is a thing fundamental to this "kind" of architecture. Kinda.

The convention "use ethereum_wallet" is just a lot harder to get going than "just use the entity's fundamental identifier."

Is... really by itself not that special an idea.

But what could you do with that address. If it's a character in a game, it surely must be an entity. So must thine sword. So must the gem in its hilt. All the way down! That's more a feature than a bug.

You have a number that identifies a thing in your buggy contracts' code. Yaay! You can buy and sell now. Or whatever the contract chooses to do with you.

Is this stupid? It might be. comme ci, comme ça.