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

Return error if Transaction contains writable executable or ProgramData accounts (backport #19629) #19730

Merged
merged 2 commits into from
Sep 9, 2021

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 8, 2021

This is an automatic backport of pull request #19629 done by Mergify.
Cherry-pick of 38bbb77 has failed:

On branch mergify/bp/v1.7/pr-19629
Your branch is up to date with 'origin/v1.7'.

You are currently cherry-picking commit 38bbb7798.
  (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:   runtime/src/accounts_db.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   programs/bpf/tests/programs.rs
	both modified:   runtime/src/accounts.rs
	both modified:   runtime/src/bank.rs
	both modified:   sdk/src/transaction.rs
	both modified:   storage-proto/proto/transaction_by_addr.proto
	both modified:   storage-proto/src/convert.rs

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


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

…ta accounts (#19629)

* Return error if Transaction locks an executable as writable

* Return error if a ProgramData account is writable but the upgradable loader isn't present

* Remove unreachable clause

* Fixup bpf tests

* Review comments

* Add new TransactionError

* Disallow writes to any upgradeable-loader account when loader not present; remove is_upgradeable_loader_present exception for all other executables

(cherry picked from commit 38bbb77)

# Conflicts:
#	programs/bpf/tests/programs.rs
#	runtime/src/accounts.rs
#	runtime/src/bank.rs
#	sdk/src/transaction.rs
#	storage-proto/proto/transaction_by_addr.proto
#	storage-proto/src/convert.rs
@mergify mergify bot added conflicts automerge Merge this Pull Request automatically once CI passes and removed automerge Merge this Pull Request automatically once CI passes labels Sep 8, 2021
@mergify
Copy link
Contributor Author

mergify bot commented Sep 8, 2021

automerge label removed due to a CI failure

@mergify mergify bot added automerge Merge this Pull Request automatically once CI passes and removed automerge Merge this Pull Request automatically once CI passes labels Sep 8, 2021
@mergify
Copy link
Contributor Author

mergify bot commented Sep 9, 2021

automerge label removed due to a CI failure

@CriesofCarrots CriesofCarrots force-pushed the mergify/bp/v1.7/pr-19629 branch from 5e36206 to 0af32bf Compare September 9, 2021 01:27
@mergify mergify bot added automerge Merge this Pull Request automatically once CI passes and removed automerge Merge this Pull Request automatically once CI passes labels Sep 9, 2021
@mergify
Copy link
Contributor Author

mergify bot commented Sep 9, 2021

automerge label removed due to a CI failure

@mergify mergify bot added automerge Merge this Pull Request automatically once CI passes and removed automerge Merge this Pull Request automatically once CI passes labels Sep 9, 2021
@mergify
Copy link
Contributor Author

mergify bot commented Sep 9, 2021

automerge label removed due to a CI failure

@mergify mergify bot added the automerge Merge this Pull Request automatically once CI passes label Sep 9, 2021
@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #19730 (0af32bf) into v1.7 (a2b4359) will decrease coverage by 0.0%.
The diff coverage is 68.3%.

@@            Coverage Diff            @@
##             v1.7   #19730     +/-   ##
=========================================
- Coverage    82.2%    82.2%   -0.1%     
=========================================
  Files         437      437             
  Lines      124057   124481    +424     
=========================================
+ Hits       102051   102390    +339     
- Misses      22006    22091     +85     

@mergify mergify bot merged commit b9a0156 into v1.7 Sep 9, 2021
@mergify mergify bot deleted the mergify/bp/v1.7/pr-19629 branch September 9, 2021 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant