Skip to content
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

Feature Gate: Consume all requested CUs for VM failures #3993

Open
jstarry opened this issue Dec 7, 2024 · 0 comments
Open

Feature Gate: Consume all requested CUs for VM failures #3993

jstarry opened this issue Dec 7, 2024 · 0 comments
Labels
feature-gate Pull Request adds or modifies a runtime feature gate

Comments

@jstarry
Copy link

jstarry commented Dec 7, 2024

SIMD

solana-foundation/solana-improvement-documents#182

Description

To improve performance, Solana programs are often compiled with a JIT that works
at the level of Basic Blocks — linear sequences of sBPF instructions with a
single entry and exit point, and no loops or branches. Basic Blocks allow for
efficient execution by reducing the overhead associated with tracking CU
consumption for each individual sBPF instruction.

However, when an exception is thrown during the execution of a Basic Block
(e.g., a null memory dereference or other faults), determining the exact number
of CUs consumed up to the point of failure requires additional effort. Requiring all clients to
track the exact number of executed sBPF instructions for consensus is costly and
unnecessary.

In the event of irregular failure, where execution aborts from the middle of
basic block, the full amount of requested CUs for the transaction will be charged to the CU
meter. This allows for a simple and efficient fallback mechanism that avoids the
need for tracking the exact number of executed instructions up to the point of
failure.

Feature ID

B7H2caeia4ZFcpE3QcgMqbiWiBtWrdBRBSJ1DY6Ktxbq

Activation Method

Single Core Contributor

Deployment Considerations

NA

Minimum Beta Version

No response

Minimum Stable Version

No response

Testnet Activation Epoch

No response

Devnet Activation Epoch

No response

Mainnet-Beta Activation Epoch

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-gate Pull Request adds or modifies a runtime feature gate
Projects
None yet
Development

No branches or pull requests

1 participant