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

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

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.6/pr-19629
Your branch is up to date with 'origin/v1.6'.

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.6/pr-19629 branch from e2b49fe to 47eb56e Compare September 9, 2021 01:27
@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 #19729 (47eb56e) into v1.6 (a78c3c0) will increase coverage by 0.0%.
The diff coverage is 94.7%.

@@           Coverage Diff            @@
##             v1.6   #19729    +/-   ##
========================================
  Coverage    82.3%    82.3%            
========================================
  Files         424      424            
  Lines      118748   118961   +213     
========================================
+ Hits        97763    98015   +252     
+ Misses      20985    20946    -39     

@mergify mergify bot merged commit 3eee222 into v1.6 Sep 9, 2021
@mergify mergify bot deleted the mergify/bp/v1.6/pr-19629 branch September 9, 2021 03:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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