Skip to content

Commit b9a67a7

Browse files
committed
Initial draft
1 parent 58ab7ca commit b9a67a7

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
simd: '0191'
3+
title: Relax Transaction Constraints - Loading Failures
4+
authors:
5+
- Andrew Fitzgerald (Anza)
6+
category: Standard/Meta
7+
type: Core/Networking/Interface/Meta
8+
status: Draft
9+
created: 2024-11-06
10+
feature: PaymEPK2oqwT9TXAVfadjztH2H6KfLEB9Hhd5Q5frvP
11+
supersedes:
12+
superseded-by:
13+
extends:
14+
---
15+
16+
## Summary
17+
18+
This proposal aims to relax certain transaction errors related to loading
19+
transaction accounts, from protocol violations to runtime errors.
20+
Specifically, if a transaction fails to load a valid program account or
21+
exceeds the requested maximum loaded account data size, the transaction
22+
may be included in a block, and the transaction fee will be charged.
23+
24+
## Motivation
25+
26+
The current transaction constraints are overly restrictive and adds complexity
27+
in determining whether a block is valid or not.
28+
This proposal aims to relax these loading constraints to simplify the protocol,
29+
and give block-producers more flexibility in determining which transactions
30+
may be included in a block.
31+
The goal is to remove this reliance on account-state in order to validate a
32+
block.
33+
34+
## New Terminology
35+
36+
These terms are used elsewhere, but are defined here for clarity:
37+
38+
- Protocol Violating Transaction Error: A transaction error that violates the
39+
protocol. This class of errors must result in the entire block being rejected
40+
by the network.
41+
- Runtime Transaction Error: A transaction error that results in a failed
42+
transaction, and may be included in the block. These transactions still
43+
incur transaction fees, and nonce advancements.
44+
45+
## Detailed Design
46+
47+
Among others, a transaction that fails to load due to violating one of the
48+
following constraints is considered a protocol violation error:
49+
50+
1. The total loaded data size of the transaction must not exceed
51+
`requested_loaded_accounts_data_size_limit`, or the default limit (64MiB).
52+
2. Any account used as a program in a top-level instruction must:
53+
- be the native loader: `NativeLoader1111111111111111111111111111111`
54+
- OR
55+
- exist
56+
- be executable
57+
- be owned by the native loader: `NativeLoader1111111111111111111111111111111`
58+
- OR
59+
- exist
60+
- be executable
61+
- the owner account be owned by the native loader: `NativeLoader1111111111111111111111111111111`
62+
- the owner account must be executable
63+
64+
This proposal moves these errors from protocol violations to runtime errors.
65+
A transaction that fails to load due to violating either one of these
66+
constraints may be included in a block, so long as it is otherwise valid.
67+
The transaction must pay transaction fees, and if present, the nonce must be
68+
advanced.
69+
70+
## Alternatives Considered
71+
72+
- Do nothing
73+
- This is the simplest option, as we could leave the protocol as is.
74+
However, this leaves the protocol more complex than it needs to be.
75+
- Relax additional constraints:
76+
- SIMD-0082 sought to relax additional constraints, but has not been
77+
accepted. This proposal is a subset of SIMD-0082, intended to make the
78+
review process simpler and faster. Therefore, we have decided to keep
79+
this proposal focused specifically on certain loading failures.
80+
81+
## Impact
82+
83+
- Transactions that would previously have been dropped with a protocol
84+
violation error can now be included and will be charged fees.
85+
- Users must be more careful when constructing transactions to ensure they
86+
are executable if they do not want to waste fees.
87+
- Block-production is simplified as it can be done without needing to load
88+
large program accounts for the initial decision to include a transaction.
89+
90+
## Security Considerations
91+
92+
None
93+
94+
## Drawbacks
95+
96+
- Users must be more careful about what they sign, as they will be charged fees
97+
for transactions that are included in a block, even if they are not executed.
98+
- This will likely break a lot of tooling, such as explorers, which may expect
99+
all transactions to attempt execution.
100+
101+
## Backwards Compatibility
102+
103+
This proposal is backwards compatible with the current protocol, since it only
104+
relaxes constraints, and does not add any new constraints. All previously valid
105+
blocks would still be valid. However, new blocks may not be valid under the old
106+
protocol.

0 commit comments

Comments
 (0)