Qbit is a multi-asset privacy oriented platform based on PoW/DPoS consensus with UTXO principles. Qbit focuses are:
- Entity-based governance
- Various kinds of typed transactions
- Schnorr signatures/multi-signatures by default
- Support of different signature schemes
- Out-of-the-box privacy transactions for the value transfer
- Scalable architecture
- Atomic swaps support
- Ultra-fast transaction processing
- Multichain support with sharding principles (including different parametrized consensuses for each shard)
- Smart contract support
- Fast virtual machine (QVM) with asm-based machine codes
- Cuckatoo PoW algorithm and corresponding consensus with 51% attack resistance
- Local-to-Global DPoS consensus
- Full Bitcoin protocol support to archieve atomic swaps and trustless peer-to-peer orders processing
- Flexible integration infrastructure to support alts- and side- chains (gate-keepers)
- DApp making infrastructure
- Built-in support of the "open digital organization" principles
- Built-in support of DEX DApp infrastructure (as one of "open digital organization" types)
There are two basic building blocks: transactions (various types) and blocks. Generic transaction consists of one or more inputs, one or more outputs, including fee. Every input and output contains hash of 'asset' type, thus single transaction can contains several assets to transfer with in&out balance consistence. Value transfer transactions is private transactions with blinded amounts (Pedersen commitment, range proofs). Transactions is not free - you need some "Qbits" to pay for them.
Block time - 5 secs. Emission ~ 66M.
In case of zero-trust principle we planning to provide transparent swap scheme. First of all every user need to dock his public Bitcoin address/key (newly generated) through emited smart-contract to the Qbit network. So, when user transfers funds from native Bitcoin network to his docked Bitcoin address, bunch of smart-contracts will provide emission of pegged Bitcoin-to-Qbit (qBTC) transaction with the corresponding amounts.
Qbit Smart contracts based on the following principles:
-
Smart-contract - entity with some methods (or methods' table) and byte-code embedded into entity body. Entity body is a special transaction with contract data and qasm code.
-
Qasm is a assembler-like byte-code/machine-code level language. It operates four groups of registers and a couple of macro-instructions. With simple and understandable logic. Turing-complete.
-
Virtual Machine - operates by qasm byte-code. Fast, secured enough.
-
Contract called by special transaction type (call-transaction) with contract address, method hash and couple of parameters to call. Contract method calls processed by all miners/validators in the same way.
Prerequisites:
- [optionally] sudo apt-get update && sudo apt-get install build-essential
- [optionally] sudo apt-get install autoconf
- [optionally] sudo apt-get install libtool
- [optionally] sudo apt-get install cmake
- sudo apt-get install libjpeg-dev
- sudo apt-get install libpng-dev
Build Linux:
- cd ./secp256k1
- ./autogen.sh
- ./configure --enable-experimental --enable-module-schnorrsig --enable-module-musig --enable-module-ecdh --enable-module-generator --enable-module-rangeproof --with-bignum=no
- cd ..
- cd ./boost
- ./bootstrap.sh --with-libraries=system,thread,chrono,random,filesystem --prefix=../
- ./b2
- cd ..
- cmake -DCMAKE_BUILD_TYPE=Release
- make
Please, note - if make produces linking errors, do the following:
- cmake ./
- make
Build Windows (on Linux with special toolset - https://mxe.cc):
- git clone https://github.com/mxe/mxe ~/mxe
- cd ~/mxe
- edit ./settings.mk and add MXE_TARGETS := x86_64-w64-mingw32.static
- make
- add path to MXE binaries to your PATH (edit .bashrc, for example)
- cd ./secp256k1
- ./autogen.sh
- ./configure --enable-experimental --enable-module-schnorrsig --enable-module-musig --enable-module-ecdh --enable-module-generator --enable-module-rangeproof --with-bignum=no --host=x86_64-w64-mingw32.static
- cd ..
- x86_64-w64-mingw32.static-cmake -DCMAKE_BUILD_TYPE=Release
- x86_64-w64-mingw32.static-cmake ./
- make
Please, note - (4) it can take long time, very long and not all from the packages you need. During compilation you may experience building errors, consider to add to the EXCLUDE_PKGS and rerun make
Build MacOS:
- install HomeBrew
- brew install autoconf
- brew install automake
- brew install cmake
- cd ./secp256k1
- ./autogen.sh
- ./configure --enable-experimental --enable-module-schnorrsig --enable-module-musig --enable-module-ecdh --enable-module-generator --enable-module-rangeproof --with-bignum=no
- cd ..
- cd ./boost
- ./bootstrap.sh --with-libraries=system,thread,chrono,random,filesystem --prefix=../
- ./b2
- cd ..
- cmake -DCMAKE_BUILD_TYPE=Release
- make
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getkey","params":[]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getbalance","params":[]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"sendtoaddress","params":["<asset|*>", "", ""]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"gettransaction","params":["<tx_id>"]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"createdapp","params":["", "<short_name>", "<long_name>", "<tx_dapp_instance>", "<static|dynamic>"]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"createshard","params":["", "<dapp_name>", "<unique_short_name>", ""]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getpeerinfo","params":[]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"mallocstats","params":["[thread_id]", "[alloc_class]", "[path_to_dump]"]}' -i -H 'content-type: text/plain' http://127.0.0.1:8080