SkillAgentSearch skills...

3DP

The Implementation of The Ledger of Things Node. Layer 1 decentralized blockchain platform for the tokenization of objects. Proof of Scan protocol. Useful smart-contracts and dApps.

Install / Use

/learn @3Dpass/3DP

README

<img width="1199" alt="LoT-min" src="https://github.com/user-attachments/assets/36474db1-598e-49ac-9bca-385e0858939b" />

The Ledger of Things Node

"The Ledger of Things" is a revolutionary open source Layer 1 blockchain platform for the tokenization of objects. White Paper. Current list of the object categories is presented as follows: 3D objects, 2D drawings, Music, Biometrics, Radio signals, Movements, Texts.

Proof of Scan is a hybrid decentralized protocol "PoW ASIC-resistant, CPU-oriented + PoA (Proof of Authority)", which is based on recognition technology. Every object, transformed by 3DPass, obtains its own unique and sustainable identity (HASH ID) the object can be recognized by. This will prevent the copying of digital assets and thus open a door for the entire blockchain space to potentially trillions in deals all over the globe.

Grid2d is 3D shape recognition algorithm, which is utilized as one of hash functions in the Proof of Scan protocol. The implementations of the algorithm are the pass3d recognition toolkit and its WASM analog p3d.

3DPRC-2 (3Dpass Request for Comments) is a standard p2p protocol for the tokenization of the User objects operating within “The Ledger of Things”, by which the most useful aspect of the "Proof of Scan" consensus is getting uncovered. 3DPRC-2 provides decentralized PoScan API available for customers.

The scope of potential 3Dpass applications goes way beyond 3D object recognition and not limited to. Being naturally organized and still cultivating this community driven spirit, 3Dpass is here to encourage developers from all around the globe to upgrade the pass3d open source toolkit with new fascinating recognition algorithms and make it even more useful for human civilization. Learn more about the algorithm requirements.

3DPass Coin (P3D) is a native utility token, operating within "The Ledger of Things" eco-system, which aims to incentivize the efforts of community members maintaining the network infrastructure. Such aspects as: Storage fee, Gas fee, The object authentication fee, Transaction fee, The validator collaterals, Penalties - are all being counted in P3D.

AI dev deepWiKi | Contribution Grant Program | Contributing guidelines | Discord

Getting started with 3Dpass Node

Download the latest release

wget https://github.com/3Dpass/3DP/releases/download/v32/poscan-consensus-linux-x86_64.tar.gz
tar xzf poscan-consensus-linux-x86_64.tar.gz

Rust Setup

If you need to build the Node on your own you have to set up the environment. First, complete the basic Rust setup instructions. You can also use this command to clone 3DP folder and set up Rust:

cd ~
git clone https://github.com/3Dpass/3DP.git
cd 3DP
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2023-05-05
source $HOME/.cargo/env
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-05-05
sudo apt-get install -y libclang-dev libssl-dev clang

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 is built, the following command can be used to explore all parameters and subcommands:

./target/release/poscan-consensus -h

Set up your keys

New account

  • Generate new account and import all of your keys (Mining key, GRANDPA key and ImOnline key) at once with the script keygen.sh:
sh keygen.sh

The keys will be imported into ~/3dp-chain/chains/3dpass/keystore

Existing account

  • Have you already had an account, use the keygen_seed.sh script to generate the keys out of your Secret Seed phrase and import them all at once.
  1. Put your Secret Seed phrase into the ~/3DP/keygen_seed.sh file like this:
bash#! /bin/bash
# A keyset will be generated out of the seed phrase below
MEMO_SEED="PUT YOUR MEMO SEED HERE"
  1. Save the the keygen_seed.sh and execute the script:
sh keygen_seed.sh

The keys will be imported into ~/3dp-chain/chains/3dpass/keystore

Manual set up

Run the Node

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.3dpass.network/submit 0" --author <your mining address or pub key> --threads 2 --no-mdns

Make sure you can see your Node on the telemetry server: https://3dpass.network. Explore additional details with this tutorial.

Run miner

  1. Install Bun
  2. Install and run miner:
bun install
bun miner.js --host 127.0.0.1 --port 9933

Node and Mining with Docker

This procedure will build and run the Node and Miner automatically with Docker (Mac, Linux, or Windows).

First, install Docker and Docker Compose.

Run the following command:

cd ~
git clone https://github.com/3Dpass/3DP.git
cd 3DP
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

You can generate your ADDRESS and MEMO_SEED phrase in the wallet. Follow this tutorial for more details.

Validator set (Masternodes)

Validators represent a set of the most reliable Nodes (authorities) eligible to vote for Best chain finalization in accordance with the GRANDPA deterministic finality protocol rules. The validator set is open to join for any Node that meets the SLA requirements. Current members are automatically selected and managed by the validator set module, which exploits a collateral-based mechanism to prevent the protocol rules violations. Follow this tutorial to set up Validator.

Connect to the web3 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.

EVM and cross-platform compatibility

The Node is equipped with EVM compatibility layer comprised of the EVM pallet (Solidity code executor) as well as eth blockchain emulator with full client on top of the Substrate based master chain.

Connect to Metamask and Remix in Local

  • Run the Node with the --rpc-port 9978 flag (any port can be set up)
  • Add a custom chain to the Metamask wallet:
    • Name: 3dpass - The Ledger of Things
    • Mainnet chain id: 1333
    • Local RPC endpoint: https://127.0.0.1:9978
  • Open Remix and select the Metamask as an injected provider.

EVM accounts

There is a cross-platform mapping in place between the Substrate (H256) and EVM (H160) accounts, which allows for cross platfom actions - native token transfers, assets methods, etc. E.g. you can transfer tokens from EVM to any Substrate account and vice versa. And every account must have its H256 version.

  • H256 -> H160 (derived by cutting the tail 20 bytes)
    • e.g. 0xc6006fea43ccce14f9432f8e6b9403113c935cc17160cd438af2e7a02624124c -> 0xc6006fea43ccce14f9432f8e6b9403113c935cc1
  • H160 (private key) -> H256 address (mapped, irreversible)
    • e.g. 0xc6006fea43ccce14f9432f8e6b9403113c935cc1 -> 0xceb75620b9f3bc3a039b8e78efed58fa3c7422d18c97f1fd44abf3f2499d0760 (ss58Format 71: d1GvktUdvKdghY7LB2zW2XDp1Wzio9ZPGGFcyaYhp2Nasy5LS)

Use this converter to create a cross-platform alias for either Substrate or EVM account.

Custom EVM precompiles

Although the EVM exploits the standard ethereum precompiles, there is a buch of custom precompiles, of which each one serves as a cross-platform EVM <-> Substrate interface, so that native substrate functions can be called from Solidity.

  • 0x0000000000000000000000000000000000000802 - Interaction with native token (P3D): balances-erc20 precompile.
  • Interaction with Local assets - assets-erc20 precompile, Contract address format: 0xFBFBFBFA + <assetid in hex>, where the assetid is the asset index in poscanAssets runtime modu
View on GitHub
GitHub Stars29
CategoryDevelopment
Updated5mo ago
Forks21

Languages

Rust

Security Score

92/100

Audited on Oct 12, 2025

No findings