solana-labs / solana

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://solanalabs.com
Apache License 2.0
13.02k stars 4.19k forks source link

Term "account" causes confusion #7240

Closed garious closed 4 years ago

garious commented 4 years ago

Problem

The data structure named "account" is more general than the thing traditionally called an account (that thing that holds your balance at a bank). It's a thing that holds some number of native tokens and optionally a chunk of program-defined serialized data, that may represent program state or some asset (i.e. ERC-20 token). Calling that thing an account is causing newcomers confusion.

Proposed Solution

Rename "Account" to "Resource".

Alternatives considered:

garious commented 4 years ago

@sakridge points out that what we call account is what Ethereum and Libra both call account too. What Libra calls a resource is more similar to what we call Account.data.

What we call an account is consistent with all non-UTXO (aka account-based) blockchains call an account. cc: @aeyakovenko

rob-solana commented 4 years ago

The data structure named "account" is more general than the thing traditionally called an account (that thing that holds your balance at a bank). It's a thing that holds some number of native tokens and optionally a chunk of program-defined serialized data, that may represent program state or some asset (i.e. ERC-20 token). Calling that thing an account is causing newcomers confusion.

This does not match my understanding. I was under the impression that the confusion came from Solana's ability to separate of the concepts of authority and address for an account.

where: authority: an entity (identified by a public key) that has the power to debit the account balance or modify the account's state, often enforced by the owner program, sometimes the own program itself address: a public key that is used to name the account, find it in the bank

Other chains typically conflow these concepts.

I don't see how renaming Account to Resource alleviates this confusion.

garious commented 4 years ago

I agree with Rob. We need to find the real source of confusion. Maybe it's with the notion of authority. Our use of account is consistent with more popular account-based blockchains.