algorand / go-algorand

Algorand's official implementation in Go.
https://developer.algorand.org/
Other
1.35k stars 473 forks source link

TEAL - Special status of Account 0 in TEAL code and Account limits #2182

Closed jeapostrophe closed 2 years ago

jeapostrophe commented 3 years ago

The TEAL spec --- page https://developer.algorand.org/docs/reference/teal/specification/ --- doesn't specify the maximum number of accounts in an appl txn, although it specifies many other limits. The limit is 5 --- https://github.com/algorand/go-algorand/blob/master/config/consensus.go#L823-L824

The TEAL spec mentions the special status of Account 0 in the balance and min_balance docs, but not in the rest of the State Access function --- https://developer.algorand.org/docs/reference/teal/specification/#state-access --- I think there should be a little paragraph here that is like the "Execution Environment" section that explains about how Account access works and points out that you always get the sender/0, but can get more.

This may not be that important to document today if it will change much later.

algoanne commented 2 years ago

I believe this has been done since this ticket was opened and the docs have been majorly updated since then (https://developer.algorand.org/docs/get-details/parameter_tables/#stateful-smart-contract-constraints).