You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0329-account-creation-slot.md
+50-15Lines changed: 50 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ authors:
5
5
- Igor Durovic (anza)
6
6
category: Standard
7
7
type: Core
8
-
status: Draft
8
+
status: Idea
9
9
created: 2025-08-01
10
10
feature: (fill in with feature key and github tracking issues once accepted)
11
11
---
@@ -16,37 +16,63 @@ Track the creation slot for each account as part of the account's metadata.
16
16
17
17
## Motivation
18
18
19
-
Currently, Solana accounts do not retain information about when they were created. Rent mechanisms like LSR (described [here](https://x.com/aeyakovenko/status/1796569211273445619?lang=en)) require account age to determine the minimum balance for a particular account, which requires knowledge of the creation slot. It helps to include this field now rather than when the rent mechanism itself is introduced because a default value needs to be selected for accounts created before feature activation. The sooner creation slot tracking is activated, the lower this default value can be, which allows for more accurate age calculation when rent is introduced.
19
+
Currently, Solana accounts do not retain information about when they were
account age to determine the minimum balance for a particular account, which
23
+
requires knowledge of the creation slot. It helps to include this field now
24
+
rather than when the rent mechanism itself is introduced because a default
25
+
value needs to be selected for accounts created before feature activation.
26
+
The sooner creation slot tracking is activated, the lower this default value
27
+
can be, which allows for more accurate age calculation when rent is
28
+
introduced.
20
29
21
30
## New Terminology
22
31
23
-
-**Account Creation Slot**: The slot number in which an account was first created (i.e., when the account's initial allocation occurred).
32
+
-**Account Creation Slot**: The slot number in which an account was first
33
+
created (i.e., when the account's initial allocation occurred).
24
34
25
35
## Detailed Design
26
36
27
37
### Account Metadata Extension
28
38
29
-
Account metadata includes an additional creation slot field encoded as an unsigned little-endian 64-bit integer.
39
+
Account metadata includes an additional creation slot field encoded as an
40
+
unsigned little-endian 64-bit integer.
30
41
31
42
### Implementation Details
32
43
33
-
1.**New Account Creation**: When a new account is created (via system program allocation or other means), the `creation_slot` field MUST be set to the current slot number.
44
+
1.**New Account Creation**: When a new account is created (via system
45
+
program allocation or other means), the `creation_slot` field MUST be set
46
+
to the current slot number.
34
47
35
-
2.**Snapshot Integration**: The creation slot MUST be included in account data when serializing snapshots and MUST be restored when deserializing snapshots.
48
+
2.**Snapshot Integration**: The creation slot MUST be included in account
49
+
data when serializing snapshots and MUST be restored when deserializing
50
+
snapshots.
36
51
37
-
3.**Default Value for Existing Accounts**: For accounts that exist before activation of this feature, the `creation_slot` field MUST be set to the slot when activation occurred. This value is the tightest upper bound on the actual creation slot.
52
+
3.**Default Value for Existing Accounts**: For accounts that exist before
53
+
activation of this feature, the `creation_slot` field MUST be set to the
54
+
slot when activation occurred. This value is the tightest upper bound on
55
+
the actual creation slot.
38
56
39
-
4.**Account Reallocation**: If an account is reallocated (expanded or contracted), the `creation_slot` MUST NOT be modified - it represents the original creation, not subsequent modifications.
57
+
4.**Account Reallocation**: If an account is reallocated (expanded or
58
+
contracted), the `creation_slot` MUST NOT be modified - it represents the
59
+
original creation, not subsequent modifications.
40
60
41
-
5.**RPC and Client Exposure**: The creation slot information SHOULD be available through relevant RPC endpoints that return account information, allowing clients to access this metadata.
61
+
5.**RPC and Client Exposure**: The creation slot information SHOULD be
62
+
available through relevant RPC endpoints that return account information,
63
+
allowing clients to access this metadata.
42
64
43
65
### Storage Considerations
44
66
45
-
The additional 8 bytes per account will increase snapshot size. For a network with N accounts, this represents an additional 8*N bytes of storage. This is considered acceptable given the utility of the information.
67
+
The additional 8 bytes per account will increase snapshot size. For a network
68
+
with N accounts, this represents an additional 8*N bytes of storage. This is
69
+
considered acceptable given the utility of the information.
46
70
47
71
### Wire Protocol
48
72
49
-
When transmitted over the network (in snapshots or account data), the creation slot will be serialized as a little-endian 64-bit unsigned integer following existing Solana serialization conventions.
73
+
When transmitted over the network (in snapshots or account data), the
74
+
creation slot will be serialized as a little-endian 64-bit unsigned integer
75
+
following existing Solana serialization conventions.
50
76
51
77
## Alternatives Considered
52
78
@@ -55,17 +81,26 @@ N/A
55
81
## Impact
56
82
57
83
### Validators
84
+
58
85
- Increase in snapshot size and memory usage (8 bytes per account)
59
86
60
87
### Core Contributors
61
-
- Foundation for future rent calculation improvements and features downstream of rent (e.g. delinquent account compression)
88
+
89
+
- Foundation for future rent calculation improvements and features downstream
90
+
of rent (e.g. delinquent account compression)
62
91
63
92
## Backwards Compatibility
64
93
65
94
This change is designed to be backwards compatible:
66
95
67
-
1.**RPC Compatibility**: Existing RPC calls will continue to work. Creation slot information can be added as additional fields in responses without breaking existing clients.
96
+
1.**RPC Compatibility**: Existing RPC calls will continue to work. Creation
97
+
slot information can be added as additional fields in responses without
98
+
breaking existing clients.
68
99
69
-
2.**Account Structure**: The creation slot is new metadata and does not modify existing account data or behavior.
100
+
2.**Account Structure**: The creation slot is new metadata and does not
101
+
modify existing account data or behavior.
70
102
71
-
3.**Snapshot Compatibility**: New snapshots will include creation slot information and the default creation slot value, but the feature can handle missing creation slot data for accounts migrated from older snapshots by applying the default value.
103
+
3.**Snapshot Compatibility**: New snapshots will include creation slot
104
+
information and the default creation slot value, but the feature can
105
+
handle missing creation slot data for accounts migrated from older
0 commit comments