ZencypherSolutions / semaphore-stellar-contracts

MIT License
1 stars 6 forks source link

feat: Implement SemaphoreKeyPts to Soroban #11

Open evgongora opened 1 week ago

evgongora commented 1 week ago

As part of the core contracts we need to migrate the SemaphoreVerifierKeyPts to Soroban.

Follow this resource: https://github.com/ZencypherSolutions/semaphore-stellar-docs/blob/main/research/SemaphoreKeyPts-implementation.md

derianrddev commented 1 week ago

Hi, I'm Derian, a fullstack developer and a member of Dojo Coding.

I'm interested in working on this issue. While I am new to this specific topic, I’m eager to learn and follow the SemaphoreKeyPts implementation resource closely to ensure my work aligns with issue requirements.

od-hunter commented 4 days ago

Hi @evgongora , please can I be assigned this? This would be my first time contributing to this repo and I’d love to be given the opportunity.

dev-chinx commented 4 days ago

hey @evgongora Mind if I work on this one? please kindly assign :)

martinvibes commented 4 days ago

holla @evgongora can i take on this issue?

salazarsebas commented 4 days ago

My background As a member of the Dojo Coding community, I have experience in web2 and traditional technologies, as for web3 I have only been working for a few months and I have managed to make a contribution, however, it is not an impediment for me to do my best in this issue, I will devote the necessary effort to contribute to the OSS.

How I plan on tackling this issue To solve this issue, I will perform the following steps:

shokuyansh commented 4 days ago

Can I work on this, please?

GradleD commented 4 days ago

To migrate the SemaphoreVerifierKeyPts contract to Soroban, you will need to adapt the existing Solidity-based implementation to fit within the Soroban framework on the Stellar blockchain.

ShantelPeters commented 4 days ago

Hello @evgongora please can I be assigned to this issue

sasasamaes commented 3 days ago

I’d like to help with this.

  1. Review the Existing SemaphoreVerifierKeyPts Implementation: Study the provided documentation at SemaphoreKeyPts Implementation. Familiarize yourself with the structure, logic, and purpose of SemaphoreVerifierKeyPts to ensure a smooth migration.
  2. Understand Soroban’s Contract Environment: Soroban, Stellar’s smart contract platform, uses Rust-based contracts with WebAssembly (Wasm) execution. Check Soroban’s documentation for any key differences in handling cryptographic operations or data structures compared to the environment SemaphoreVerifierKeyPts was originally written for.
  3. Identify Required Adjustments: • Data Structures: Ensure compatibility of data structures used in SemaphoreVerifierKeyPts with Soroban, especially any cryptographic keys or points. • Cryptographic Functions: Verify if Soroban’s standard library has built-in cryptographic functions needed for SemaphoreVerifierKeyPts. If not, consider importing compatible libraries, or adapting existing ones, as Soroban supports a limited subset of Rust’s no_std. • Event Emissions and Logging: Soroban uses events for logs or notifications. Ensure that SemaphoreVerifierKeyPts events (if any) are migrated to Soroban’s event system.
  4. Translate Code to Soroban-Compatible Rust: • Write or adapt SemaphoreVerifierKeyPts to Rust for Soroban, focusing on translating any functions, structures, or cryptographic operations to their Soroban equivalents. • Soroban has constraints around memory and processing, so optimize the code where possible.
  5. Testing the Migration: • Unit Tests: Use Soroban’s testing framework to verify that the core logic of SemaphoreVerifierKeyPts works as expected after migration. • Integration Tests: Test the contract within a Soroban development environment to ensure it integrates correctly with other Soroban contracts or modules in the project.
  6. Documentation and Code Review: • Document any changes made during migration for future reference. • Conduct a code review to ensure all functionality is preserved and performs well on Soroban. ETA: 2 Weeks
Tobybrandsync commented 8 hours ago

May I take this issue on? To migrate SemaphoreVerifierKeyPts to Soroban, we need to adapt its structure to Soroban’s specific environment and Stellar's protocol constraints. This process involves reconfiguring cryptographic proof verifications and key handling from the Semaphore library to fit Soroban’s smart contract capabilities. The document at SemaphoreKeyPts implementation provides a guide on re-implementing key points within Stellar’s decentralized framework, including necessary modifications for proof logic, parameter adjustments, and data storage compatible with Soroban’s WASM-based runtime.

0xdevcollins commented 8 hours ago

Can I try solving this issue?