Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Feature: disable CPI setting is_executable and rent_epoch#26987

Merged
Lichtso merged 4 commits intosolana-labs:masterfrom
Lichtso:feature/disable_cpi_setting_executable_and_rent_epoch
Aug 9, 2022
Merged

Feature: disable CPI setting is_executable and rent_epoch#26987
Lichtso merged 4 commits intosolana-labs:masterfrom
Lichtso:feature/disable_cpi_setting_executable_and_rent_epoch

Conversation

@Lichtso
Copy link
Copy Markdown
Contributor

@Lichtso Lichtso commented Aug 8, 2022

Problem

#19762 added is_executable and rent_epoch to be deserialized in CPI. These two fields however are not deserialized at the return edge of BPF programs.

Summary of Changes

Stop setting is_executable and rent_epoch in CPI after the newly added feature disable_cpi_setting_executable_and_rent_epoch is active.

Feature Gate Issue: #26988

@Lichtso Lichtso requested a review from jstarry August 8, 2022 13:42
@Lichtso Lichtso force-pushed the feature/disable_cpi_setting_executable_and_rent_epoch branch from 921d7a5 to e03eab6 Compare August 8, 2022 13:46
@Lichtso Lichtso changed the title Feature: disable cpi setting executable and rent epoch Feature: disable CPI setting is_executable and rent_epoch Aug 8, 2022
jstarry
jstarry previously approved these changes Aug 8, 2022
@jstarry jstarry added the feature-gate Pull Request adds or modifies a runtime feature gate label Aug 8, 2022
@mergify mergify Bot dismissed jstarry’s stale review August 9, 2022 13:01

Pull request has been modified.

@jstarry
Copy link
Copy Markdown
Contributor

jstarry commented Aug 9, 2022

Removes TEST_EXECUTABLE_LAMPORTS

Actually, could you add tests that enforce the new behavior of ignoring changes to executable / rent_epoch?

@Lichtso Lichtso merged commit 85a679b into solana-labs:master Aug 9, 2022
@Lichtso Lichtso deleted the feature/disable_cpi_setting_executable_and_rent_epoch branch August 9, 2022 22:22
@Lichtso Lichtso removed the feature-gate Pull Request adds or modifies a runtime feature gate label Aug 11, 2022
@Lichtso
Copy link
Copy Markdown
Contributor Author

Lichtso commented Aug 11, 2022

I already opened a feature gate issue: #26988

@jstarry
Copy link
Copy Markdown
Contributor

jstarry commented Aug 11, 2022

Yes, I saw that. Why did you remove the label? The feature-gate label was intended to make it easy to search for PRs that created or modified a feature.

@Lichtso
Copy link
Copy Markdown
Contributor Author

Lichtso commented Aug 11, 2022

Oh, ok I thought it was only for the feature issues

@Lichtso Lichtso added the feature-gate Pull Request adds or modifies a runtime feature gate label Aug 11, 2022
xiangzhu70 pushed a commit to xiangzhu70/solana that referenced this pull request Aug 17, 2022
…-labs#26987)

* Adds the feature disable_cpi_setting_executable_and_rent_epoch.

* Adds the feature gate for disable_cpi_setting_executable_and_rent_epoch.

* Removes TEST_EXECUTABLE_LAMPORTS.

* Test that is_executable and rent_epoch are ignored.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature-gate Pull Request adds or modifies a runtime feature gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants