-
Notifications
You must be signed in to change notification settings - Fork 108
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
SIMD-0191: Relax Transaction Constraints - Loading Failures #191
base: main
Are you sure you want to change the base?
Changes from 1 commit
b2b0c4e
0e3b852
cc73e72
41d47a9
30f2741
89ccac3
ebed71e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,30 @@ constraints may be included in a block, so long as it is otherwise valid. | |
The transaction must pay transaction fees, and if present, the nonce must be | ||
advanced. | ||
|
||
Constraints must be checked before committing transactions and voting. | ||
It is reccomended that the constraints are checked before transaction | ||
execution, in order to avoid unnecessary computation. | ||
|
||
The `TransactionError` variants do not need to change from their current | ||
values. This proposal only changes how the validator handles these errors. | ||
For completeness, the following error variants are affected: | ||
|
||
- `MaxLoadedAccountDataSizeExceeded` - breaking constraint 1: | ||
- Loaded acount data exceeds the specified or default limit. | ||
- There are proposed changes to the evaluation of this constraint: | ||
[SIMD-0186](https://github.com/solana-foundation/solana-improvement-documents/pull/186) | ||
- `ProgramAccountNotFound`, `InvalidProgramForExecution` - breaking constraint 2. | ||
Currently checks are performed in this order: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Annoyingly, if we want errors to be exactly the same.. We need to prescribe that invoked program accounts are checked in tx instruction order as well. And after we check each invoked program, we need to check for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. proposal to just wrap these all into a new variant I will specify it should be in instruction order as well |
||
- (`ProgramAccountNotFound`) Transaction-level instruction invokes an | ||
account that does not exist | ||
- (`InvalidProgramForExecution`) Transaction-level instruction invokes an | ||
account that is not executable | ||
- (`InvalidProgramForExecution`) Transaction-level instruction invokes an | ||
account which is not owned by an account which is owned by the native | ||
loader (only relevant after [SIMD-0162](https://github.com/solana-foundation/solana-improvement-documents/pull/162)) | ||
- (``ProgramAccountNotFound`) Transaction-level instruction invokes an | ||
account whose owner does not exist (only relevant after [SIMD-0162](https://github.com/solana-foundation/solana-improvement-documents/pull/162)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically these should be flipped around right? And we forgot about checking that the owner account is executable as well. |
||
|
||
## Alternatives Considered | ||
|
||
- Do nothing | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
I don't exactly get why you said "and voting".. is specifying before committing sufficient?