You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resolve_id calls actor::resolve_address which, if I recall correctly implements the semantics that "If the argument is an ID address it is returned directly." Am I correct that one of your complaints is you don't want that behaviour?
If we want to fix it, I'd say the VM should change. But I would warn that this is very common (almost every method call) and so the pass-through behaviour probably makes quite a difference, vs a HAMT lookup.
resolve_id calls actor::resolve_address which, if I recall correctly implements the semantics that "If the argument is an ID address it is returned directly." Am I correct that one of your complaints is you don't want that behaviour?
Basically, yes.
But I would warn that this is very common (almost every method call) and so the pass-through behaviour probably makes quite a difference, vs a HAMT lookup.
Yeah... I agree. I've just talked with users who have been surprised.
Honestly, it probably isn't worth changing for the reasons you're stating.
The current address initialization/resolution logic has a few warts:
resolve_id
doesn't guarantee that the ID address is actually assigned. This isn't a huge issue, but can be very confusing.initialize_account
is no longer accurate. It will need to be something likeinitialize_address
.initialize_address
/initialize_account
. They should instead callresolve_or_create
/resolve_or_init
.IMO, we should have two methods:
resolve_existing
that asserts that the target ID actually exists.resolve_or_init
that tries to create the target ID.We can also just rename
initialize_account
toinitialize_address
...The text was updated successfully, but these errors were encountered: