Coder Social home page Coder Social logo

tadpoleswiminyangtze / secretnetwork Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scrtlabs/secretnetwork

0.0 0.0 0.0 357.7 MB

π•Š The Secret Network

Home Page: https://scrt.network

License: Other

Shell 1.47% JavaScript 0.19% Python 0.02% C 0.10% Go 41.70% Rust 54.04% TypeScript 1.10% Makefile 0.79% Dockerfile 0.59%

secretnetwork's Introduction

Secret Network

Secret Network offers scalable permissionless smart contracts with a private by default designβ€” bringing novel use cases to blockchain not feasible on public systems. Secret Network enables users to take back ownership over their private (financial) information and for them to share this information with whom they trust. Secret Network was the first protocol to provide private smart contracts on mainnet, live since September 2020. Secret Network is Built with the Cosmos Software Development Kit (SDK) bringing Interoperable privacy to the entire Cosmos ecosystem. Secret Network uses a combination of the Intel SGX (Software Guard Extension) Trusted Execution Environment technology, several encryption schemes and key management to bring privacy by default to blockchain users. Secret Contracts are an implementation of the Rust based smart contract compiling toolkit CosmWasm, adding private metadata possibilities. Secret Network is powered by the Native public coin SCRT which is used for fees, Proof Of Stake security and Governance. With more than 20+ Dapps, 100+ full time builders and a strong grassroots community Secret Network aims to bring privacy to the masses.

Setting up Environment

Prebuilt Environment

Gitpod

Click the button below to start a new development environment:

Open in Gitpod

VSCode Docker Environment

  1. Install extension

  2. Clone this repository into a new dev container

Docker Dev Environments

  1. From Docker Desktop, create a new Dev Environment from the prebuilt image - ghcr.io/scrtlabs/secretnetwork-dev:latest
  2. Connect with VSCode, or use the container directly
  3. Make sure the code is updated by using get fetch and git pull

Manual Set up

You can find everything below in a handy script that you can copy and run from here

Install prerequisite packages

apt-get install -y --no-install-recommends g++ libtool automake autoconf clang

Ubuntu 22+

The build depends on libssl1.1. Install using:

wget https://debian.mirror.ac.za/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0%2Bdeb11u1_amd64.deb
dpkg -i libssl1.1_1.1.1w-0%2Bdeb11u1_amd64.deb

Clone Repo

Clone this repo to your favorite working directory

Install Rust

Install rust from https://rustup.rs/.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then, add the rust-src component. This will also install the version of rust that is defined by the workspace (in rust-toolchain) -

rustup component add rust-src

To run tests you'll need to add the wasm32 target -

rustup target add wasm32-unknown-unknown

Install Go (v1.18+)

Install go from https://go.dev/doc/install

Install gobindata

sudo apt install go-bindata

Install SGX

To compile the code and run tests, you'll need to install the SGX SDK and PSW. To run in simulation (or software) modes of SGX you do not need to install the SGX driver. For a simple install, run the install-sgx.sh script in the following way:

chmod +x ./scripts/install-sgx.sh
sudo ./scripts/install-sgx.sh true true true false

Note: If you are using WSL you'll need to use the 5.15 kernel which you can find how to do here, otherwise you'll have to run anything SGX related only in docker

Install Xargo

We need a very specific version of xargo for everything to compile happily together

cargo install xargo --version 0.3.25

Install submodules

We use incubator-teaclave-sgx-sdk as a submodule. To compile the code, you must first sync this submodule

git submodule init
git submodule update --remote

Build from Source

Use make build-linux to build the entire codebase. This will build both the Rust (enclave & contract engine) and the Go (blockchain) code.

To build just the rust code, you can use make build-linux, while to build just the Go code, there is the aptly named make build_local_no_rust.

Tip: For a production build the enclave must be copied from the most recent release. This is due to non-reproducible builds, and the fact that enclaves must be signed with a specific key to be accepted on mainnet. Still, the non-enclave code can be modified and ran on mainnet as long as there are no consensus-breaking changes

Running Something

Run tests

To build run all tests, use make go-tests

Start local network

Run ./scripts/start-node.sh

Documentation

For the latest documentation, check out https://docs.scrt.network

Community

secretnetwork's People

Contributors

assafmo avatar cashmaney avatar toml01 avatar reuvenpo avatar liorbond avatar eshelb avatar dependabot[bot] avatar jlwaugh avatar mohammedpatla avatar privatepixels avatar lacabra avatar faddat avatar secretchaingirl avatar levackt avatar valdok avatar darwinzer0 avatar itshaseebsaeed avatar luca992 avatar cankisagun avatar kent-3 avatar dylanschultzie avatar luiseel avatar sbellem avatar the-dusky avatar guyz avatar fishmanl avatar daviddemeij avatar dbriggsie avatar aronvanammers avatar ikapitonau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.