Skip to content

Commit

Permalink
Spec update for unlimited assets
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Feb 18, 2022
1 parent 85e6db1 commit a01a625
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions dev/ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ The Algorand Ledger is parameterized by the following values:
Currently defined as 140,000.
- $\omega_r$, the rate at which the reward rate is refreshed.
- $A$, the size of an earning unit.
- $Assets_{\max}$, the maximum number of assets held by an account.

## States

Expand Down Expand Up @@ -381,17 +380,17 @@ parameters_, which can be encoded as a msgpack struct:
a [TEAL Key/Value Store][TEAL Key/Value Stores]. This field is encoded with
msgpack field `gs`.

Parameters for applications created by an account are stored in a map in the
account state, indexed by the application ID. This map is encoded as msgpack
field `appp`. The maximum number of applications that a single account may
create is 10. Creating one application increases the minimum balance
Parameters for applications created by an account are stored alongside the
account state, indexed by a pair (address, application ID).
There is no limit on amount of application an account can create.
Creating one application increases the minimum balance
requirements of the creator by 100000 microalgos, plus the [`GlobalStateSchema`
Minimum Balance contribution][App Minimum Balance Increases].

`LocalState` for applications that an account has opted in to are also stored in
a map in the account state, indexed by the application ID. This map is encoded
as msgpack field `appl`. The maximum number of applications that a single
account may opt in to is 10. Opting in to one application increases the minimum
`LocalState` for applications that an account has opted in to are also stored alongside
the account state, indexed by a pair (address, application ID).
There is no limit on amount of application an account can opt in to.
Opting in to one application increases the minimum
balance requirements of the opting-in account by 100000 microalgos plus the
[`LocalStateSchema` Minimum Balance contribution][App Minimum Balance Increases].

Expand Down Expand Up @@ -496,10 +495,10 @@ which can be encoded as a msgpack struct:
The clawback address is used to issue asset transfer transactions
from arbitrary source addresses.

Parameters for assets created by an account are stored in a map in the
account state, indexed by the asset ID.
Parameters for assets created by an account are stored alongside the
account state, indexed by a pair (address, asset ID).

Accounts can hold up to $Assets_{\max}$ assets (1000 in this protocol).
Accounts can create and hold any number of assets.
An account must hold every asset that it created (even if it holds 0
units of that asset), until that asset is destroyed. An account's asset
holding is simply a map from asset IDs to an integer value indicating
Expand Down Expand Up @@ -780,10 +779,6 @@ The _authorizer address_, a 32 byte string, determines against what to verify th

The logic signature is valid if exactly one of _sig_ or _msig_ is a valid signature of the program by the authorizer address of the transaction, or if neither _sig_ nor _msig_ is set and the hash of the program is equal to the authorizer address. Also the program must execute and finish with a single non-zero value on the stack. See [TEAL documentation](TEAL.md) for details on program execution.

A transaction must be rejected if its inclusion in a block would cause an
account's minimum balance to exceed the _maximum minimum balance_ of 100100000
microalgos.

## ApplyData

\newcommand \ClosingAmount {\mathrm{ClosingAmount}}
Expand Down Expand Up @@ -1244,9 +1239,6 @@ all following conditions hold:
$\Stake(\rho+1, I) \geq b_{\min} \times (1 + NA)$, where $NA$ is the number of
assets held by that account.

- For all addresses, the number of assets held by that address must be less than
$Assets_{\max}$.

- $\sum_I \Stake(\rho+1, I) = \sum_I \Stake(\rho, I)$.

# Previous Hash
Expand Down

0 comments on commit a01a625

Please sign in to comment.