onflow / onflow/flow

Migrate address prefix from 0x to Fx

Open
#322 8 comments 0 reactions 1 assignee View on GitHub

@psiemens is already working on this.

Since Jan 18, 2021.

Epic Improvement
Dominant language
Go
Stars
361
Forks
159
PR merge metrics
No merged PRs in 30d

Description

Issue To Be Solved

To make Flow account addresses easily distinguishable, we'd like to represent them as all-uppercase hexadecimal strings with an Fx prefix. For example:

Fx969D07CEDE37E32B

This requires a change from the current 0x format. We'd like to update all usages of addresses (across all tools and libraries) to be as follows:

1. When reading Flow addresses, the following formats are accepted:

  • No prefix (e.g. 969D07CEDE37E32B)
  • 0x prefix (e.g. 0x969D07CEDE37E32B)
  • Fx prefix (e.g. Fx969D07CEDE37E32B)
  • fx prefix (e.g. fx969D07CEDE37E32B)
  • All of the above in lowercase

The only exception to the above is Cadence, which should only accept 0x and Fx addresses.

2. When printing or displaying Flow addresses, the following format is always used:

  • Fx prefix (e.g. Fx969d07cede37e32b)
Yikes, this is a lot to change 😬

The migration from 0x to Fx does not need to happen immediately -- we can do this gradually across all of our tools. All updates should be done in a backwards compatible fashion (as described above) to avoid breaking changes when possible.

I'm proposing that we first update all tools to satisfy case 1 above (reading addresses). We should only start displaying the Fx prefix once all of our existing tools can understand both formats.

This change affects the following tools and projects:

  • Cadence
  • flow-go
  • FVM
  • Go SDK
  • JS SDK
  • FCL
  • FCL Ledger companion app
  • Port
  • Emulator
  • Playground
  • CLI
  • Documentation site
  • VS Code extension
  • Testnet faucet

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.