[OLD] The F4 Address Class #459
Replies: 17 comments 73 replies
-
A way to enforce checksums would be to include a byte length of the bytes, with the remaining bytes being the checksum. |
Beta Was this translation helpful? Give feedback.
-
Should the Code CID of egg actors be a magic CID or the CID of some (carefully made) minimal actor code? |
Beta Was this translation helpful? Give feedback.
-
We can try to borrow |
Beta Was this translation helpful? Give feedback.
-
We could also start this address range earlier at, say, 20. |
Beta Was this translation helpful? Give feedback.
-
How are f4 and f2 associated together? An additional map in init actor? Both added to |
Beta Was this translation helpful? Give feedback.
-
From context it looks like Exec4 calls into Bind4 functionality if the f4 address contains an egg but this is not laid out explicitly in the Exec4 spec. Is that correct? |
Beta Was this translation helpful? Give feedback.
-
Do f4 eggs created through sends also get a stable f2 address? |
Beta Was this translation helpful? Give feedback.
-
Can you explain why we can't support this? I would urge us to try. Without this, it's impossible to get the actor ID corresponding to an unbound f2 address. This means that for a natural representation of state like token balances as a mapping of actor ID to balance, f2 addresses cannot be supported. This would prevent transferring tokens to a counterfactual address. This request is somewhat independent of this f4 proposal, and I was going to request it anyway, suggesting a similar placeholder/embryo approach to hold the balance until an actor could be deployed there. Will this proposal make that harder? |
Beta Was this translation helpful? Give feedback.
-
Two small questions about forwarding
This is the egg's state cid at the top level actor struct right? Could we instead inline actor id? Just a varint should be good no? ** If we call these things eggs then forwarded eggs should be called hatched. (If we call them embryos they should be differentiated)
|
Beta Was this translation helpful? Give feedback.
-
A few note on the clarity/context/expression, separate from comments about the substance:
What does this new term "bind" mean? I figured it out, of course, but please either define this or (preferable) remove it and talk about "mapping address to actor ID" explicitly instead.
Do you mean the actor ID or the (f0) ID address? Using the address here is just a waste of space. Just use the actor ID. Also you don't need to define actor ID in terms of the payload of an f0 address: the actor ID is canonical and addresses defined in terms of it. I suggest using actor ID directly generally everywhere that you're using an f0 address (including the inline CID for forwarding that Zen commented above).
Please pick just one of these terms and use it exclusively. I'd already forgotten the "hereafter" by the time I first read "egg", partly because you did then use "embryo" a few times before switching. Delete reference to the other term from the doc entirely. |
Beta Was this translation helpful? Give feedback.
-
Why mix the f4 bindings into the others? We can save HAMT traversal if we can identify a subset directly from the key, and have two, smaller HAMTs. "Requiring no additional state or state migrations" is not a good reason for a design choice here – these are easy to do. |
Beta Was this translation helpful? Give feedback.
-
I do not think the motivation for ID address forwarding justifies the complexity introduced. Re-binding addresses breaks the monotonicity of address -> ID mapping, as well as the "actor has one ID" property that you noted. This stable mapping is needed for on- and off-chain programming. Forwarding won't work for actors that have stored eggs' actor IDs in state, e.g. as keys to a mapping of asset balances. But given N:1 actor addresses to IDs, the ID is the only sensible key to use. Token-like actors need a canonical key to be fixed so they can stably identify whether two addresses refer to the same actor. And they do need to be able to assign balances to IDs of not-yet-deployed actors just the same as native tokens. This'll be neatly solved by f4 in the basic case. Anything like “the eggs funds will be transferred to the actor” will break in the general case of user actors – so needing to do it is probably a design warning. It only works for the actor->balance mapping embedded in the state tree. Note that DeleteActor also has the "transfer funds to another actor" thing, but it's not at all surprising that any user-programmed tokens held by a deleted actor are lost. Forwarding also adds a bunch of complexity to understanding the state tree forevermore: future core protocol developments as well as countless off-chain analysis tooling. I recommend simply removing Bind4. |
Beta Was this translation helpful? Give feedback.
-
I think it's implied, and some of it in the comments, but it would have helped me to see an explicit proposal for predictable addresses. You've kinda covered it in "counterfactual interactions", but that is only one use case for predictable addresses. I would like to see:
|
Beta Was this translation helpful? Give feedback.
-
Generally in favor of this proposal, still trying to wrap my head around certain parts. Zooming out a bit and thinking about use cases, I think it's important to meet the following criteria:
This proposal certainly meets the first point, but I'm still trying to figure out more about the second 2 |
Beta Was this translation helpful? Give feedback.
-
Can a namespace bind multiple addresses to the same code CID? |
Beta Was this translation helpful? Give feedback.
-
Could we let the name management actor define how to encode the sub-address, so that we could use different encoding method for different purpose. It would be really great if the f432 (or f460 as I suggested) address shows the same sub-address as its corresponding Eth address, i.e. hex. When it comes to BTC, base58 is used to keep the addresses the same too. |
Beta Was this translation helpful? Give feedback.
-
Proposed changes (before I make them to the draft)
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This post contained a draft of the F4 address class FIP proposal. The FIP has now been proposed but you can view past versions of this post by clicking the "edited" drop-down at the top of this post.
FIP Proposed: #474
New Discussion: #473
Beta Was this translation helpful? Give feedback.
All reactions