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

fix and improve program-configuration.md & program-architecture.md#423

Closed
wuuer wants to merge 21 commits intosolana-foundation:mainfrom
wuuer:program-optimization
Closed

fix and improve program-configuration.md & program-architecture.md#423
wuuer wants to merge 21 commits intosolana-foundation:mainfrom
wuuer:program-optimization

Conversation

@wuuer
Copy link
Contributor

@wuuer wuuer commented Sep 4, 2024

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 function deploy 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.

wuuer and others added 14 commits August 29, 2024 00:02
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.
@wuuer wuuer requested a review from nickfrosty as a code owner September 4, 2024 08:00
@mikemaccana
Copy link
Contributor

mikemaccana commented Sep 4, 2024

Just a note to myself that this PR covers the same files as #372. See #372 (comment)

@wuuer
Copy link
Contributor Author

wuuer commented Sep 5, 2024

Just a note to myself that this PR covers the same files as #372. See #372 (comment)
@mikemaccana .
No, This PR is new.
see
#372 (comment)

Update [reallocate the account] link.
Update [clockwork] link.
Update [advanced-program-architecture] repo link
@wuuer wuuer changed the title fix and improve program-configuration.md fix and improve program-configuration.md & program-architecture.md Sep 5, 2024
Copy link
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.

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!

@wuuer
Copy link
Contributor Author

wuuer commented Sep 13, 2024

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.

@github-actions
Copy link

github-actions bot commented Dec 1, 2024

This pull request has been automatically marked as stale because it has not had recent activity. Remove stale label or comment or this will be closed in 7 days.

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