incognito-chain

command module
v0.0.0-...-7ece11e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 81 Imported by: 0

README

What is Incognito?

We now live in a token economy. Everything is being tokenized. Fiats. Gold. Bond. Storage. Computing Power. Digital Art. Collectibles. Buildings. More.

We believe the biggest problem to this new token economy is the lack of privacy. Current blockchains display all transactions publicly — so anyone can see your balances or track your activity. Given the choice, we strongly believe that very few people will willingly disclose their crypto financials to the entire world. Incognito offers anyone the option to turn on privacy mode in this new token economy.

That's why we work to create solutions that make privacy widely accessible and incredibly simple for anyone, anywhere on earth, to exercise their right to that choice.

Incognito is live. Give it a try!

Github branches and running environments

In Incognito’s Git version control, there are three main branches, first for core team development, second for release and third for production:

  • development (on Testnet 1): this is a branch that developers would branch from for building feature X and create pull requests to merge into. The code on this branch is usually deployed onto Testnet 1.

  • release (on Testnet 2): After finishing testing on Testnet 1, the changes from development branch would be merged into this branch then deployed onto Testnet 2. The code on this branch should be almost the same as production’s.

  • production (on Mainnet): After finishing testing on Testnet 2, the changes from release branch would be merged into this branch then deployed onto Mainnet. In an emergency case, hot fixes would also be branched directly from this branch and merged into it through PR(s). The fixes would be deployed onto Mainnet and then cherry-picked into release & development branches.

Build the code

By golang programming language

The below instructions will get you up and running on your local machine for development and testing purposes. Building Incognito requires Go. Once Go is installed, clone this project to your local GOPATH and build it.

go build -o incognito

Then, run an Incognito Node

./incognito -n incognito --testnet false --discoverpeers --discoverpeersaddress 51.91.72.45:9330 --miningkeys "your validator key" --nodemode "auto" --datadir "/path/to/data" --listen "0.0.0.0:9334" --externaladdress "0.0.0.0:9334" --norpcauth --enablewallet --wallet "incognito" --walletpassphrase "your wallet passphrase" --walletautoinit --rpclisten "0.0.0.0:9335" --rpcwslisten "0.0.0.0:9336" --loglevel "info"

By make package

You can simply build and run the code with a few simple command with make package:

  1. Clear everything with make clean (optional for clearing database)
  2. Build with command: make build
  3. Run with command: make mainnet

Optional

When running Incognito node with docker environment you can update image by a third party. we recommend https://github.com/containrrr/watchtower by running below command

docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower \
    --cleanup \
    --remove-volumes \
    --include-restarting \
    incognito-mainnet

Read the code

There is more than 1 million lines of code in the Incognito codebase. Below is a quick overview of Incognito architecture and its key components that will help you navigate through the code.

  • P2P Networking

    • Peer Management. Peer management handles peer-to-peer communications such as finding peers, connecting to them, sending and receiving transactions, blocks, and messages. Its code is in the connmanager package and addrmanager package.

    • NetSync. NetSync is a mediator that receives incoming messages, parses them, and routes the messages to the right components. Its code is in netsync package.

    • Highway. Highway is a new network topology design that speeds up P2P communications. Its code is in highway repo.

  • Blockchain

    • Shards. Shards are subchains. A subchain is a Proof-of-Stake blockchain with its own committee of N nodes. A shard's job is to produces new block via a Practical Byzantine Fault Toloerance (pBFT) consenus algorithm. Its code is in the blockchain package.

    • Beacon. Beacon is also a subchain. A beacon's job is to coordinates the shards and maintain the global state of the network. Its code is in the blockchain package.

    • Synker. Synker makes sure the node is up to date among its peers and also broadcasts the node status to its peers. Its code is in the blockchain package.

    • Mempool. Mempool (memory pool) is a collection of transactions and blocks that have been verified but are not yet confirmed. Its code is in the mempool package.

    • Wallet. Software that holds all your Incognito keys. Use it to send and receive your Incognito tokens. Its code is in the wallet package.

    • Database. Incognito uses LevelDB to store block data. Its code is in the drawdbv2 package and statedb package.

  • Core

    • Consensus

      • pBFT. For consensus algorithm, Incognito implements pBFT (Practical Byzantine Fault Tolerance). Its code is in the blsbft package.

      • BLS. For multi-signature agregation, Incognito implements BLS Multi-Signatures. Its code is in the blsmultisig package.

      • RNG. For random number generator, Incognito currently uses Bitcoin block hash. We'll explore other RNG solutions in the future. Its code is in the btc package.

    • Privacy

      • RingCT. For privacy, Incognito implements RingCT (Ring Confidential Transaction) with ring signatures, stealth addresses, and confidential transactions. Its code is in the privacy package.

      • Confidential Asset. RingCT hides the amount of the transaction, but it doesn't hide the type of asset being sent. Confidential Asset solves that. It's under development under the new-privacy-dev branch and will be merged into the master branch in April 2021.

      • Mobile ZKP. Incognito implements Zero-Knowledge Proofs (ZKP) Generation on mobile. Private transactions can be sent on any regular phone under 15 seconds. Its code is in the wasm package and the zeroknowledge package.

    • Bridges

      • Ethereum. Incognito implements a trustless two-way bridge between Incognito and Ethereum to let anyone send and receive ETH & ERC20 privately. Its code is in the bridge-eth repository.

      • Bitcoin. Incognito is working on a trustless two-way bridge between Incognito and Bitcoin to let anyone send and receive BTC privately. Here is its proposal (TBD). Estimated ship date: April 2021.

    • pDEX

      Incognito implements a first privacy-protecting decentralized exchange to let anyone freely trade without disclosing their identity with high throughput and low latency. Its code is in the blockchain package.

  • Developer Tools

    • RPC. RPC lets developers interact with Incognito via your own programs. Its code is in the rpcserver package.

    • WebSocket. WebSocket is another way for developers to interact with Incognito via your own programs. Its code is in the rpcserver package.

    • SDK. Incognito is working on Developer SDKs to make it even easier to build on top of Incognito. Estimated ship date (TBD).

  • Apps

    • Mobile Apps. It's easy to build your own mobile apps on top of Incognito, once the SDK is available. Here is an example: Mobile Wallet.

    • Web Apps. It's easy to build your web apps on top of Incognito, once the SDK is available. Here are some examples: Web Wallet or a Desktop Network Monitor.

    • Hardware Devices. It's easy to build your own hardware on top of Incognito, once the SDK is available. Here is an example: Node Device.

Contribution

Incognito is and will always be 100% open-source. Anyone can participate, everyone can join, no one can ever restrict or control Incognito. There are many ways to participate.

  • Report a bug via Github Issues

  • Suggest a new feature via Github Issues

  • Want to build a feature or fix a bug? Please send a Pull Request for the maintainers to review your code and merge into the main codebase.

  • Write tests. We'll provide instructions soon how to setup local test environment.

License

Incognito is released under the terms of the MIT license. See COPYING for more information or see LICENSE

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
bin
Package memorydb implements the key-value database layer based on memory maps.
Package memorydb implements the key-value database layer based on memory maps.
Go port of Coda Hale's Metrics library
Go port of Coda Hale's Metrics library
exp
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
env
key
operation
Package operation allows for basic manipulation of scalars & group elements
Package operation allows for basic manipulation of scalars & group elements
operation/edwards25519
Package edwards25519 implements group logic for the twisted Edwards curve
Package edwards25519 implements group logic for the twisted Edwards curve
operation/edwards25519/field
Package field implements fast arithmetic modulo 2^255-19.
Package field implements fast arithmetic modulo 2^255-19.
privacy_v2/bulletproofs
Package bulletproofs manages the creation, proving & verification of Bulletproofs.
Package bulletproofs manages the creation, proving & verification of Bulletproofs.
privacy_v2/bulletproofs/v1
Package bulletproofs manages the creation, proving & verification of Bulletproofs.
Package bulletproofs manages the creation, proving & verification of Bulletproofs.
privacy_v2/mlsag
variable names to match names in the crypto protocol Package mlsag contains the implementation of MLSAG, a ring signature scheme.
variable names to match names in the crypto protocol Package mlsag contains the implementation of MLSAG, a ring signature scheme.
relaying
bnb
btc
Package transaction manages the creation & verification of all transaction types
Package transaction manages the creation & verification of all transaction types
coin_indexer
Package coinIndexer implements a UTXO cache for v2 output coins.
Package coinIndexer implements a UTXO cache for v2 output coins.
ota

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL