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

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

Merged
mergify[bot] merged 2 commits intov1.7from
mergify/bp/v1.7/pr-19629
Sep 9, 2021
Merged

Return error if Transaction contains writable executable or ProgramData accounts (backport #19629)#19730
mergify[bot] merged 2 commits intov1.7from
mergify/bp/v1.7/pr-19629

Conversation

@mergify
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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 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