Skip to content

Official implementation of the Creditcoin protocol

License

Notifications You must be signed in to change notification settings

bytetigers/creditcoin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gluwa Creditcoin

What is Creditcoin?

Creditcoin is a network that enables cross-blockchain credit transaction and credit history building. Creditcoin uses blockchain technology to ensure the objectivity of its credit transaction history: each transaction on the network is distributed and verified by the network.

The Creditcoin protocol was created by Gluwa. Gluwa Creditcoin is the official implementation of the Creditcoin protocol by Gluwa.

For more information, see creditcoin.org, or read the original whitepaper.

Getting Started

Developer Setup

Dependency Setup

First, you must complete the basic environment setup.

Run

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

WARNING: running natively on Windows is unsupported.

Explore Node Options

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

./target/release/creditcoin-node -h

Connecting to Creditcoin Networks

A node can be configured to connect to different Creditcoin networks. Each network has different configurations and use cases.

Devnet Testnet Mainnet
Overview Local/public development environment Public testing environment Live production environment
Users Developers Developers & testers End users
Function To develop new features & improvements To test new features & improvements To secure credit history on-chain
Tokens Test tokens with no real world economic value Test tokens with no real world economic value Real tokens with economic value
Chain history Wiped frequently Wiped occasionally Preserved

The network configuration is specified using the --chain flag and the --bootnodes flag, which specifies the initial nodes to connect to. Currently, only the test network chain specs include bootnodes. The main and dev networks bootnodes must be specified manually.

Example:

./target/release/creditcoin-node --chain main --bootnodes "/dns4/bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAEgDL126EUFxFfdQKiUhmx3BJPdszQHu9PsYsLCuavhb"

ChainSpecs

Creditcoin networks are configured using a ChainSpec. The ChainSpec is a JSON file that defines the initial configuration of the network. To use a ChainSpec, use the --chain flag when starting the node.

  • Mainnet: --chain main
  • Testnet: --chain test
  • Devnet: --chain dev

Bootnodes

Bootnodes are nodes that are always on and can be used to bootstrap new nodes and discover other nodes in the network. To use a bootnode, use the --bootnodes flag when starting the node followed by the bootnode's address.

Mainnet bootnodes:

  • /dns4/bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAEgDL126EUFxFfdQKiUhmx3BJPdszQHu9PsYsLCuavhb
  • /dns4/bootnode2.creditcoin.network/tcp/30333/p2p/12D3KooWSQye3uN3bZQRRC4oZbpiAZXkP2o5UZh6S8pqyh24bF3k
  • /dns4/bootnode3.creditcoin.network/tcp/30333/p2p/12D3KooWFrsEZ2aSfiigAxs6ir2kU6en4BewotyCXPhrJ7T1AzjN

Testnet bootnodes:

  • /dns4/testnet-bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWG3eEuYxo37LvU1g6SSESu4i9TQ8FrZmJcjvdys7eA3cH
  • /dns4/testnet-bootnode2.creditcoin.network/tcp/30333/p2p/12D3KooWLq7wCMQS3qVMCNJ2Zm6rYuYh74cM99i9Tm8PMdqJPDzb
  • /dns4/testnet-bootnode3.creditcoin.network/tcp/30333/p2p/12D3KooWAKUrvmchoLomoouoN1sKfF9kq8dYtCVFvtPuvqp7wFBS

Devnet bootnodes:

  • /dns4/devnet-bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWMtJz2E3ENY66Sfoa1MDmV3ZATXRKUWdeZgtEjfme6iwS

Single-Node Development Chain

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

./target/release/creditcoin-node --dev

Purge the development chain's state:

./target/release/creditcoin-node purge-chain --dev

Start the development chain with detailed logging:

RUST_BACKTRACE=1 ./target/release/creditcoin-node -ldebug --dev

Connect with Polkadot-JS Apps Front-end

Once the node template is running locally, you can connect it with Polkadot-JS Apps front-end to interact with your chain. Click here connecting the Apps to your local node template.

Multi-Node Local Testnet

If you want to see the multi-node consensus algorithm in action, refer to our Start a Private Network tutorial.

Links Regarding legacy Creditcoin 1.x implementation

Removing collect_coins 08.03.24

About

Official implementation of the Creditcoin protocol

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 71.1%
  • Rust 26.5%
  • JavaScript 1.2%
  • Other 1.2%