Redefine Address as `U128` + `Identity` and Hash as `U256`
Description of Changes
Redefines Address as u128.
API and ABI breaking changes
Breaks the stored type of Address in system tables and in user tables.
I think in the face of Tyler's proposal that changes identity/address representation altogether, this PR might become obsolete.
@RReverser My understanding is that the Identity type will still be a 32 byte value and in that case, this still makes it more efficient and more amenable to fast access through indices. The Address changes will become obsolete though. I'm holding off on more work on this PR until the picture becomes clearer.
I got the Rust part of the PR mostly rebased, still need to do the C# part. If there are open design discussions remaining we should probably have them.
This is now fully ready for merge together with https://github.com/clockworklabs/SpacetimeDBPrivate/pull/1060 @Centril
This is now fully ready for merge together with clockworklabs/SpacetimeDBPrivate#1060 @Centril
PR looks good, but did you give any thought to the formatting changes of identity? I personally think they are an improvement, but ymmv.
PR looks good, but did you give any thought to the formatting changes of identity? I personally think they are an improvement, but ymmv.
Ah, see Ingvar's comment above.
Ah the Rust implementation probably needs to revert to original hex stringification as well. We do use identity/address strings in a few places (e.g. configs), so this would be a breaking change.
This is a breaking change anyway but it's a wipe-the-database breaking change rather than a rewrite-your-configs breaking change at the moment.
PR looks good, but did you give any thought to the formatting changes of identity? I personally think they are an improvement, but ymmv.
Ah, see Ingvar's comment above.
Ah the Rust implementation probably needs to revert to original hex stringification as well. We do use identity/address strings in a few places (e.g. configs), so this would be a breaking change.
This is a breaking change anyway but it's a wipe-the-database breaking change rather than a rewrite-your-configs breaking change at the moment.
In that case, I think this is good to merge, but I cannot approve my own PR... :)