-
Notifications
You must be signed in to change notification settings - Fork 259
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
fix and improve program-configuration.md & program-architecture.md #423
base: main
Are you sure you want to change the base?
Conversation
replace "init" with "init_if_needed" for vault field in the struct InitializeVault<'info>. delete unnecessary parameters "accounts()" in the test typescript.
…st typescript. Consistently use "rpc()" in the test typescript. Use InitSpace to calculate space needed for accounts. Update BDD style for the test typescript.
change "token account" in the "Starter" section to "associated token account" change "token account" in the "Add `initialize_pool_secure" section to "associated token account"
Use InitSpace to calculate space needed for accounts. Use the latest "connection.confirmTransaction()" Delete Unnecessary parameters found in the test typescript. Consistently use "rpc()" as sending transactions in the test typescript.
Replace "BorshDeserialize" and "BorshSerialize" with "AnchorDeserialize" and "AnchorSerialize". Make test descriptions more clear.
Delete the "Secure account closing section" section because “CLOSED_ACCOUNT_DISCRIMINATOR” was removed in the latest version of anchor-lang. Delete "force_defund" because “CLOSED_ACCOUNT_DISCRIMINATOR” was removed in the latest version of anchor-lang. Add the new secure instruction of account closing. Delete Unnecessary parameters found in the test typescript. Change the Logic of closing account "Sets the account discriminator to the `CLOSED_ACCOUNT_DISCRIMINATOR` variant" to "Assigning the owner to the System Program"
Use InitSpace to calculate space needed for accounts.
Update the error message in the section "Run the existing test". Add “--skip-deploy” to the test command. Delete an unnecessary setup in the section "Adding a `local-testing` feature". Delete Unnecessary parameters found in the test typescript.
…-content into program-security
Just a note to myself that this PR covers the same files as #372. See #372 (comment) |
|
Update [reallocate the account] link. Update [clockwork] link. Update [advanced-program-architecture] repo link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR(#423) is for program-optimization course content.|
Check the Files tab of this PR #423. There are a bunch of changes in program-security course.
This PR(#372) is for program-security course content.
Remove the program-security changes from this PR.
Then please find and remove any other overlaps - thanks!
@mikemaccana Got it. |
Problem
program-configuration.md
The error message is not expected in the section "Run the existing test" section.
The "--skip-deploy" option for the test command
anchor test
is required as the deploy function is found in the typescript.anchor test
will deploy the program with program_data's upgrade_authority_address set to system program (11111111111111111111111111111111), which results in an error while running the test case "Initialize Admin config should be successfully" . Deploying the program by the typescript functiondeploy
will set the program_data's upgrade_authority_address to the wallet used.The course has included the challenging content.
program-architecture.md
[stack] and [heap] docs links are invalid.
[reallocate the account] link is invalid.
[clockwork] link is invalid.
The [advanced-program-architecture] repo including the latest version update is found.
Summary of Changes
program-configuration.md
Update the correct error message in the section "Run the existing test".
Add “--skip-deploy” to the test command.
Delete an unnecessary setup in the section "Adding a
local-testing
feature".Remove the challenge section.
Also, I made a PR for solana-admin-instructions starter branch and a PR for solana-admin-instructions solution branch
which must be synced with this PR.
program-architecture.md
Update [stack] and [heap] docs links.
Update [reallocate the account] link.
Update [clockwork] link.
Update [advanced-program-architecture] repo link.