Skip to content
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

Added basics/processing-instructions/poseidon #285

Merged

Conversation

ritikbhatt20
Copy link
Contributor

@ritikbhatt20 ritikbhatt20 commented Oct 29, 2024

Screenshot 2024-10-31 141624

Key Differences from previous processing-instructions PRs:

  • Poseidon Transpiler lacks support for logging msgs in Solana Programs from Poseidon. The logging functionality provided by console.log() calls is not preserved and not converted to msg! in Anchor, so this is done manually in lib.rs.
    I have raised issue to poseidon for this: Lack of Support for Logging Messages from console.log to msg! in Poseidon Turbin3/poseidon#26
  • As i abided by the exact same structure with the Anchor code, the resulting transpiled Rust code includes a 'info lifetime parameter in the context struct even when it is not used. This causes an error during the Anchor build process.
    Raised issue to poseidon for this: Issue: Unused 'info Parameter in Transpiled Anchor Code Turbin3/poseidon#29

    Edit- Issue resolved 🚀🚀
  • Followed the original exact program structure from the processing-instructions example in Anchor, ensuring consistency which some previous PR's didn't follow.
  • Includes both Anchor and Bankrun tests, providing comprehensive test coverage that was missing in previous PRs.

Moreover:
added an example for processing-instructions Poseidon program in the /basics/processing-instructions/poseidon directory.

replaced all occurrences of yarn with pnpm to maintain consistency across the project.

executed pnpm fix to ensure code quality.

committed the pnpm-lock.yaml file to the repository.

@heyAyushh heyAyushh added contribute:poseidon Adds a poseidon example contribution to the repository. processing-instructions basics/processing-instructions labels Nov 15, 2024
Copy link
Member

@heyAyushh heyAyushh left a comment

Choose a reason for hiding this comment

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

Thanks for your submission! To verify the technical implementation, please complete these steps:

  1. Merge the main branch into your PR to get the latest updates
  2. Run pnpm fix at the project root for consistent code style
  3. Ensure your implementation includes:
    • Transpiled Anchor program in the programs folder
    • TypeScript files in the ts-programs folder
  4. Run poseidon sync to synchronize program ID and keys
  5. Run cargo fmt and cargo clippy for Rust code quality
  6. Push your changes

Please note: This review is to verify technical completeness of the submission

Let me know once you've completed these steps and I'll review again. Thanks!

@ritikbhatt20
Copy link
Contributor Author

Thanks for your submission! To verify the technical implementation, please complete these steps:

  1. Merge the main branch into your PR to get the latest updates

  2. Run pnpm fix at the project root for consistent code style

  3. Ensure your implementation includes:

    • Transpiled Anchor program in the programs folder
    • TypeScript files in the ts-programs folder
  4. Run poseidon sync to synchronize program ID and keys

  5. Run cargo fmt and cargo clippy for Rust code quality

  6. Push your changes

Please note: This review is to verify technical completeness of the submission

Let me know once you've completed these steps and I'll review again. Thanks!

gm @heyAyushh ,

I've completed the requested steps:

  1. Merged main into my branch.
  2. Ran pnpm fix.
  3. Verified the implementation includes the transpiled Anchor program and TypeScript files.
  4. Synchronized program ID
  5. Ran cargo fmt and cargo clippy for Rust code quality.
  6. Pushed all updates.

Please review again. Thank you!

@ritikbhatt20
Copy link
Contributor Author

gm @heyAyushh ,

I have refactored the changes according to new Poseidon Str type..
please review again thanks!

Copy link
Member

@heyAyushh heyAyushh left a comment

Choose a reason for hiding this comment

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

LGTM

@heyAyushh heyAyushh merged commit acc05e5 into solana-developers:main Jan 2, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribute:poseidon Adds a poseidon example contribution to the repository. processing-instructions basics/processing-instructions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants