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

Program Security - Updated duplicate mutable accounts lesson #399

Merged
mikemaccana merged 5 commits into
solana-foundation:mainfrom
0xCipherCoder:fix-duplicate-mutable-accounts
Sep 3, 2024
Merged

Program Security - Updated duplicate mutable accounts lesson #399
mikemaccana merged 5 commits into
solana-foundation:mainfrom
0xCipherCoder:fix-duplicate-mutable-accounts

Conversation

@0xCipherCoder
Copy link
Copy Markdown
Contributor

@0xCipherCoder 0xCipherCoder commented Aug 30, 2024

Problem

Updated a lesson compatible with the latest anchor version, conventions, and best practices as per the guidelines and fixed grammatical mistakes.

Summary of Changes

Unboxed PRs
Starter - Unboxed-Software/solana-duplicate-mutable-accounts#1
Solution - Unboxed-Software/solana-duplicate-mutable-accounts#2

Fixes #

@0xCipherCoder 0xCipherCoder changed the title Updated duplicate mutable accounts lesson Program Security - Updated duplicate mutable accounts lesson Aug 31, 2024
Consider a program that updates a data field for `user_a` and `user_b` in a
single instruction. If the same account is passed for both `user_a` and
`user_b`, the program will overwrite the data field with the second value,
potentially leading to unintended side effects.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent @0xCipherCoder - this has a lot higher signal:noise ratio than the older version.

Comment thread content/courses/program-security/duplicate-mutable-accounts.md Outdated
Comment thread content/courses/program-security/duplicate-mutable-accounts.md Outdated
Comment thread content/courses/program-security/duplicate-mutable-accounts.md Outdated
Copy link
Copy Markdown
Contributor

@mikemaccana mikemaccana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work @0xCipherCoder. It's clear you've read the contributing guidelines. I made some small changes to the test names (see https://github.com/solana-foundation/developer-content/blob/main/CONTRIBUTING.md#jsts) but this is great. Setting you as the winner for this bounty.

@mikemaccana
Copy link
Copy Markdown
Contributor

@0xCipherCoder I can't find your entry linking this PR on on https://earn.superteam.fun/listings/bounty/update-solana-developer-lessons/ ? Can you please make one if you haven't already?

@0xCipherCoder
Copy link
Copy Markdown
Contributor Author

Excellent work @0xCipherCoder. It's clear you've read the contributing guidelines. I made some small changes to the test names (see https://github.com/solana-foundation/developer-content/blob/main/CONTRIBUTING.md#jsts) but this is great. Setting you as the winner for this bounty.

@mikemaccana
I have already made an entry for this bounty. Previously it was intro to security lesson later updated to this PR. Actually I have submitted multiple PRs but made only this entry.

@mikemaccana
Copy link
Copy Markdown
Contributor

Found it! You'll be in the winners list on 12 Sep at the end of the bounty. 🏆

I'd love you to work on more lessons - feel free to contact me (@mikemaccana on telegram or x) to help find a good entry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants