Skip to content

SIMD-0186: Define LoaderV4 #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions proposals/0186-loaded-transaction-data-size-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ the unique intersection of:
irrespective of how they are used.
* The set of programdata accounts referenced by the LoaderV3 program
accounts specified on the transaction.
2. Each account's size is defined as the byte length of its data prior to
2. Each loaded account's size is defined as the byte length of its data prior to
transaction execution plus 64 bytes to account for metadata.
3. There is an additional flat 8248 byte cost for transactions that use an
address lookup table, accounting for the 8192 bytes for the maximum size of such
a table plus 56 bytes for metadata.
3. There is a flat 8248 byte cost for each address lookup table used by a
transaction, accounting for the 8192 bytes for the maximum size of such a table
plus 56 bytes for metadata.
4. The total transaction loaded account data size is the sum of these sizes.

Transactions may include a
Expand All @@ -102,17 +102,20 @@ counted otherwise.
Read-only and writable accounts are treated the same. In the future, when direct
mapping is enabled, this SIMD may be amended to count them differently.

If an account does not exist, it has not been loaded, and thus its size is 0.

Comment on lines 104 to +106
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added another clarification. imo this was already implicitly the rule because this whole simd refers to the size of loaded accounts

We include programdata size for LoaderV3 programs because using the program
account on a transaction forces an unconditional load of programdata to compile
the program for execution. We always count it, even when the program account is
not a transaction program ID, because the program must be available for CPI.
not a transaction program ID, because the program must be available for CPI. If
the programdata account does not exist, then its size is 0, and transaction
loading continues as normal.

There is no special handling for any account owned by the native loader,
LoaderV1, or LoaderV2.
LoaderV1, LoaderV2, or LoaderV4.

Account size for programs owned by LoaderV4 is left undefined. This SIMD should
be amended to define the required semantics before LoaderV4 is enabled on any
network.
The cost for address lookup tables described in point 3 does not include the
actual byte length or the additional 64 bytes described in point 2.

## Alternatives Considered

Expand Down
Loading