DAOTask/module2/module2_rust.md

4.0 KiB

Alternative to Module 1 R&D in Rust and WASM

Goal

the Car and Trunk R&D to ensure that the trunk build website (yew mostly) builds a decentralizable website and assets. Consider using CAR management for the assets.

HELIA R&D will ensure that the website and its assets runs in a HELIA instance. This will add seeds and thus network speed to the content distribution. All the assets should be integrated in the project so that it does not depend on centralized systems. This module is important to ensure frontend decentralization.

Ethers-web with ethers-rs and wasm implementation, so that it connects to the Ethereum blockchain and perform some testing operations. The Goal is to ensure the ethers connector can be decentralized and included in the project code. This module is important to ensure comunication with the smart contracts in a decentralized way.

RUST/WASM Architecture Diagram

dig1

dig1. Shows the front end DAPP architecture for SBT

ToDo

  • Research CAR

  • Detect and Report issue (Update this specification)

  • Research and test possible solutions.

  • Implement solution to achieve the goal.

  • Research HELIA

  • How to solve the website hashing paradigm

  • Detect and Report issue (Update this specification)

  • Research and test possible solutions.

  • Implement solution to achieve the goal.

  • Basic understading YEW

  • Basic understading Ethers-rs(similar sintax to ethers-web)

  • Fork main chain

  • Create a base project to interact with DECA Smart Contract

  • Create some general access to functions for th DECA Smart Contract

CAR Specification

Trunk found issues

Trunk Creates the instances based a proyect path, we require something such as make relative3 for IPFS support. posible solution

Possible solutions

Fork and Rewrite Trunk.

Cargo References

HELIA Specification

Hashing paradigm

To have a self decentralized website we need to add a hash to the code this hash known as CID is generated based on all the assets hashed data, so it makes a paradigm problem to add the hash if its not know previously in the code, because if we add it to the code of the site, the project hash will change.

Possible solutions

  1. Using SmartContract: Use a smart contract with an IPNS and a ENS (Ethereum Name Service NFT) which points to an IPNS that will be updated by the project developer. This gives us the flexibility to update, and security that the blockchain offers. This can also be an alternative to avoid MITM and other security issues.
  • Pros: ToDo

  • Cons: ToDo

Notes and further developments.

  1. Make the ENS Updateable by a DAO and a smart wallet.

HELIA References

ETHERS-WEB Specification

Notes and further developments.

Note1: Ethers-rs will be depercated in favor of alloy (yet alloy is not production ready).

Ethers References