filecoin-project / filecoin-project/actors-utils

Address resolution/initialization warts

Open
#147 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
17
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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.
- With [FIP0048](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0048.md), `initialize_account` is no longer accurate. It will need to be something like `initialize_address`.
- Users should never call `initialize_address`/`initialize_account`. They should instead call `resolve_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` to `initialize_address`...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.