|
| 1 | +--- |
| 2 | +simd: 'XXXX' |
| 3 | +title: Relax Precompile Failure Constraint |
| 4 | +authors: Justin Starry (Anza) |
| 5 | +category: Standard |
| 6 | +type: Core |
| 7 | +status: Draft |
| 8 | +created: 2024-07-25 |
| 9 | +feature: (fill in with feature tracking issues once accepted) |
| 10 | +--- |
| 11 | + |
| 12 | +## Summary |
| 13 | + |
| 14 | +The Solana protocol currently prohibits block producers from including transactions |
| 15 | +with precompile instructions that fail verification. This constraint is not ideal |
| 16 | +since block producers have to do work to verify precompiles without a guarantee |
| 17 | +that they can receive a fee from the transaction. |
| 18 | + |
| 19 | +## Motivation |
| 20 | + |
| 21 | +Ensure that block producers are sufficiently incentivized to include transactions |
| 22 | +which make use of precompile instructions by allowing such transactions to be |
| 23 | +included in a block even if verification fails. |
| 24 | + |
| 25 | +## Alternatives Considered |
| 26 | + |
| 27 | +NA |
| 28 | + |
| 29 | +## New Terminology |
| 30 | + |
| 31 | +NA |
| 32 | + |
| 33 | +## Detailed Design |
| 34 | + |
| 35 | +The Solana protocol will no longer reject blocks with transactions that have |
| 36 | +failed precompile verification. Such transactions will be allowed to be recorded |
| 37 | +in a block and verification failures should be handled similarly to how SVM |
| 38 | +program instruction failures are handled. The transaction will be included, fees |
| 39 | +deducted, but no other account state changes should be persisted. |
| 40 | + |
| 41 | +## Impact |
| 42 | + |
| 43 | +End users that submit transactions with invalid precompile instructions will now |
| 44 | +be able to see clearly in explorers and other tooling that their transactions |
| 45 | +failed rather than those transactions being dropped. They will also be charged |
| 46 | +fees for such transactions. |
| 47 | + |
| 48 | +Block producers can be assured that compute time spent on verifying precompiles |
| 49 | +will be compensated with fees. |
| 50 | + |
| 51 | +## Security Considerations |
| 52 | + |
| 53 | +NA |
| 54 | + |
| 55 | +## Drawbacks *(Optional)* |
| 56 | + |
| 57 | +NA |
| 58 | + |
| 59 | +## Backwards Compatibility *(Optional)* |
| 60 | + |
| 61 | +This change will require the use of a new feature gate which will remove |
| 62 | +the precompile failure constraint from produced blocks. |
0 commit comments