GithubHelp home page GithubHelp logo

zofoc / 3dp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 3dpass/3dp

0.0 0.0 0.0 5.03 MB

Implementation of 3DPass Node. Proof of Scan decentralized blockchain platform for tokenization of things, preventing assets form copy making. Useful smart-contracts and dApps.

Home Page: https://3dpass.org/

License: GNU General Public License v3.0

Shell 0.47% JavaScript 7.45% Rust 91.46% Makefile 0.02% Dockerfile 0.60%

3dp's Introduction

logo

3Dpass Node - mainnet

3DPass is an OpenSource decentralized WEB 3.0 P2P platform for tokenization of real physical and virtual objects and its transformation into digital assets. The main idea of 3DPass is to make it possible for people to use real world objects in digital within smart-contracts and deals and to take all advantages from that (learn more about 3DPass features ). Follow the White Paper for the details.

Every object, transformed by 3DPass, has its own unique and stable identity called HASH ID the object might be recognized by. In order to encourage users to maintain the network and to solve issues there is a cryptocurrency 3DP Coin.

3D Pass NODE is a Layer 1 blockchain based on Substrate with brandnew consensus Proof of Scan using 3D object shape recognition algorithm called Grid2d, which is implemented into the Node with the recognition tool pass3d. Proof of Scan is a kind of non-conventional PoW consensus because of the computing power is used for 3D shape recognition. 3Dpass NODEs are designed to provide objects authenticity check. You might call it The Ledger of unique things, which allows to utilize them within smart-contracts and dApps. The network nodes will prevent assets from copying.

---How to contribute---

In order to contribute on solving the global digital transformation challenge feel free to implement or develop new recognition algorithms into pass3d toolkit (e.x.face recognition, fingerprint recognition, radio signal, 2D drawings, melody, voice, 3D objects, etc.) or make your suggessions about. It always encourages that developers contribute to 3DPass growth, would it be miner tools, network features, dApps, smart-contracts, impementations, new projects and ideas etc. Dive down into 3DPass contribution rewards program

Join 3Dass community:

---How to contribute---

Integration

This is an eco-system scheme, which represents general functional elements:

  • 3DPass NODE (based on Substrate) - wallets, dApps, smart-contracts, IoT devices integration using API and RPC
  • Pass3d and p3d recognition toolkit - recognition algorithms integration

This toolkit consists of stable recognition algorithms used for identification of things (3D objects and others, learn more >> ). Since the recognition technology is what the digital transformation process of anything is beginning from, and the result of the processing would always be its HASH ID, it implies every application, integrated into 3DPass eco-system, to have Pass3d or p3d toolkit implemented.

  • Proof of Scan consensus - the logic, using 3D objects recognition toolkit, that allows network participants to agree on the state of the blockchain

  • 3DPass light wallet - desktop users and 3D printing labs integration

  • Pass3d mobile - smartphone and tablets users integration

  • Smart contracts toolkit - Substrate based smart contract tools using ink, a Rust-based embedded domain specific language (eDSL) for writing WebAssembly smart contracts. Learn more about how it compares to Solidity. As well, it allows unmodified EVM code to be executed in the 3DPass blockchain. Some special Substrate fetures are designed to closely emulate the functionality of executing contracts on the Ethereum mainnet within the 3DPass network.

  • IPFS storage - embedded decentralized storage for assets

  • RPC (remote procedure call) - the capabilities that allow blockchain users to interact with the network. The NODE provides HTTP and WebSocket RPC servers. How to set up websocket

  • Networking: we use the libp2p networking stack to allow the nodes in the network to communicate with one another.

Architecture

Getting Started

Follow the steps below to get started with the 3DPass Node:

Rust Setup

First, complete the basic Rust setup instructions.

Run a temporary node

The provided cargo run command will launch a temporary node and its state will be discarded after you terminate the process. After the project has been built, there are other ways to launch the node.

cargo run --release -- --dev --tmp

Build

The cargo run command will perform an initial build. Use the following command to build the node without launching it:

cargo build --release

Embedded Docs

Once the project has been built, the following command can be used to explore all parameters and subcommands:

./target/release/poscan-consensus -h

Mining with Docker

This procedure will build the Node and Miner automatically with Docker.

First, install Docker and Docker Compose.

Run the following command:

cp docker-compose.override.yml.example docker-compose.override.yml
// TODO: put your `MEMO_SEED` and `ADDRESS` in `docker-compose.override.yml`
docker compose build
docker compose up

docker-compose.override.yml example:

version: "3.9"

  services:
      node:
        environment:
          - MEMO_SEED=[PLACE MEMO SEED HERE]
          - ADDRESS=[PLACE MINER ADDRESS HERE]
          - THREADS=2
          - INTERVAL=100
  • THREADS=2 is the amount of threads you are about to use for mining
  • INTERVAL=100 is the amount of time in miliseconds between the last and the next one objects being sent towards the Node. Dependidng on how much threads are you mining with, reduce the interval until you reach desired proc load.

You can generate your ADDRESS and MEMO_SEED phrase in the wallet (add new address). Make sure you can see your node in the list. Use this tutorial for more details.

Mining: manual set up

Generate youur mining address and keys:

./target/release/poscan-consensus generate-mining-key --base-path ~/3dp-chain/ --chain mainnetSpecRaw.json

Register your mining key in the keystore:

./target/release/poscan-consensus import-mining-key 'your secret phrase' --base-path ~/3dp-chain/ --chain mainnetSpecRaw.json

Generate your GRANDPA keys for finalization. Use the same secret phrase as it's used for mining address (The account is defined by the secret phrase):

./target/release/poscan-consensus import-mining-key 'your secret phrase' --base-path ~/3dp-chain/ --chain mainnetSpecRaw.json
## Development

Insert Grandpa key into the keystore:

./target/release/poscan-consensus key insert --base-path ~/3dp-chain/ --chain mainnetSpecRaw.json --scheme Ed25519 --suri <secret seed from Grandpa> --key-type gran

Make sure you have both keys in the keystore ~/3dp-chain/chains/3dpass/keystore

Start the Node with the following command:

./target/release/poscan-consensus --base-path ~/3dp-chain/ --chain mainnetSpecRaw.json --name MyNodeName --validator --telemetry-url "wss://submit.telemetry.3dpass.org/submit 0" --author <your mining address or pub key> --threads 2 --no-mdns

Install miner (You have to install NodeJS v16 and Yarn before):

yarn

Run miner:

yarn miner --interval 100
  • --interval 100 is the amount of time in miliseconds between the last and the next one objects being sent towards the Node. Dependidng on how much threads are you mining with, reduce the interval until you reach desired proc load.

Make sure you can see your node in the list. Use this tutorial for more details.

Connect to the wallet Front-end

Open the wallet page: https://wallet.3dpass.org/. In order to connect your Node to the wallet in local you need to set up your local API endpoint as ws://127.0.0.1:9944 in the Settings. Follow this guidelines for more details.

Development

Single-Node Development Chain

This command will start the single-node development chain with persistent state:

./target/release/poscan-consensus --dev

Purge the development chain's state:

./target/release/poscan-consensus purge-chain --dev

Start the development chain with detailed logging:

RUST_BACKTRACE=1 ./target/release/poscan-consensus -ldebug --dev

Multi-Node Development Chain

Clear keystore for Alice and Bob:

rm -R /tmp/alice/ /tmp/bob/

Import mining key for Alice into the keystore:

target/release/poscan-consensus import-mining-key //Alice --base-path /tmp/alice

Run the first Node with the Alice's pub key:

target/release/poscan-consensus --base-path /tmp/alice --chain local --alice --port 30333 --ws-port 9944 --rpc-port 9933 --unsafe-rpc-external --node-key 0000000000000000000000000000000000000000000000000000000000000001 --validator -lposcan=debug --author 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d

Run the second Node:

target/release/poscan-consensus --base-path /tmp/bob --chain local --bob --port 30334 --ws-port 9945 --rpc-port 9934  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp --validator

3dp's People

Contributors

4meta5 avatar joshorndorff avatar fedosov avatar mishk avatar paulsff avatar jimmychu0807 avatar jeluard avatar shawntabrizi avatar herou avatar danforbes avatar mkdior avatar kaichaosun avatar wheresaddie avatar honeywest avatar apopiak avatar brenzi avatar igorline avatar tripleight avatar nuke-web3 avatar fishmonger45 avatar waylandc avatar juniuszhou avatar iczc avatar dependabot[bot] avatar boneyard93501 avatar andor0 avatar vedant1811 avatar bertstachios avatar cimm avatar shirshak55 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.