ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.86k stars 1.38k forks source link

Put rune balance into utxo entry #3970

Closed raphjaph closed 1 month ago

raphjaph commented 1 month ago

We have these two tables. Would it make sense to put the rune balances into the UtxoEntry/ParseUtxoEntry as well and combine these two tables? @partialord @casey

define_table! { OUTPOINT_TO_RUNE_BALANCES, &OutPointValue, &[u8] }
define_table! { OUTPOINT_TO_UTXO_ENTRY, &OutPointValue, &UtxoEntry }
casey commented 1 month ago

I think only if it improves performance / reduces the size of the database.

partialord commented 1 month ago

I looked at this briefly when I was doing the unified table work! It's a plausible idea, although there are two issues:

So my feeling is this probably isn't worth the code churn right now, although it might be worth looking at again in a few years. In the meantime, though, it would be nice to keep the ordering issue in mind when adding new features -- any new features that depend on processing order will make it harder to unify those tables later.

casey commented 1 month ago

Seems reasonable to me. Let's revisit this when it becomes more of a win. Hopefully runes will just completely die off so we never have to deal with it 😂