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

v2.0: feat: deplete compute meter for vm errors (backport of #3751) #3956

Closed
wants to merge 4 commits into from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Dec 5, 2024

Problem

Implements SIMD-0182 by making sure that programs that fail with VM errors consume the remaining compute budget to simplify compute unit handling.

Summary of Changes

  • Consume remaining compute budget for all VM errors except those that originate from syscalls
  • Use existing replay cost tracker feature gate
  • Rekey replay cost tracker feature gate

Feature Gate Issue: solana-labs#29595


This is an automatic backport of pull request #3751 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner December 5, 2024 20:05
@mergify mergify bot added conflicts feature-gate Pull Request adds or modifies a runtime feature gate labels Dec 5, 2024
@mergify mergify bot assigned jstarry Dec 5, 2024
Copy link
Author

mergify bot commented Dec 5, 2024

Cherry-pick of b120fc1 has failed:

On branch mergify/bp/v2.0/pr-3751
Your branch is up to date with 'origin/v2.0'.

You are currently cherry-picking commit b120fc1388.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   programs/bpf_loader/src/lib.rs
	modified:   programs/sbf/Cargo.lock
	modified:   programs/sbf/Cargo.toml
	new file:   programs/sbf/rust/divide_by_zero/Cargo.toml
	new file:   programs/sbf/rust/divide_by_zero/src/lib.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   programs/sbf/tests/programs.rs
	both modified:   sdk/src/feature_set.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link
Author

mergify bot commented Dec 5, 2024

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@jstarry jstarry force-pushed the mergify/bp/v2.0/pr-3751 branch from 2bc37de to 9f7d415 Compare December 6, 2024 05:45
t-nelson
t-nelson previously approved these changes Dec 6, 2024
@bw-solana bw-solana force-pushed the mergify/bp/v2.0/pr-3751 branch 2 times, most recently from 2326781 to b1c9268 Compare December 11, 2024 04:35
jstarry and others added 4 commits December 11, 2024 13:25
* feat: deplete compute meter for vm errors

* add tests

* rekey apply_cost_tracker_during_replay

(cherry picked from commit b120fc1)

# Conflicts:
#	programs/sbf/tests/programs.rs
#	sdk/src/feature_set.rs
@bw-solana bw-solana force-pushed the mergify/bp/v2.0/pr-3751 branch from 3e82a25 to 3e692ee Compare December 11, 2024 21:25
@bw-solana bw-solana requested a review from t-nelson December 13, 2024 19:29
@t-nelson
Copy link

this needs sme approval

@jstarry
Copy link

jstarry commented Jan 6, 2025

Closing in favor of #4296

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

Successfully merging this pull request may close these issues.

3 participants