Forge is a full fledge blockchain framework for developers to build decentralized applications easily. Unlike other public chain solutions (e.g. ethereum), forge gives the developers / operators the freedom to launch their own customized chains with their own application logic. For example, one can easily build a chain on top of forge to allow their users to host events and sell event tickets - although centralized services can do this kind of requirements perfectly, giving that data is not owned by centralized service, people can easily exchange tickets freely, without the permission of the original service.
For non-blockchain developers, Forge opened a door to build services that give you the following unique benefits:
authenticated storage: data could be trusted from the input (transaction) all the way down to the storage (state)
authenticated computation: the software would execute in a trust-worthy manner.
fault tolerance: the software could resist from CFT (crash fault tolerance) to BFT (byzantine fault tolerance).
built-in payment support: without any extra effort developer could build a system with payment support. For example, a bidding system that is open and transparent; a trading system for digital assets that you can trust.
In a very high level, a typical blockchain app consists of:
networking: for secure p2p connectivity and data replication.
mempool: for broadcasting tx.
consensus: for agreeing on most recent block.
storage: account states.
VM: for executing turing-complete contracts.
app logic: for specific business logic, e.g. create event and sell tickets.
RPC: for providing functionalities for user to interact with the chain.
Forge provides these functionalities:
A diversified wallet system. User / developers can choose their favorite algorithms that supported by Mcrypto to generate their wallet. And keep the wallet safe by constantly migrate the wallet to a new set of keys or even algorithm.
A fat tx protocol layer. Forge ships with many common tx protocols for you to build the application, including but not limited to:
declare / migrate: declare a wallet, a node, an app, or anything backed by a wallet to the chain. Migrate a wallet to another one - as simple as password rotation.
create_asset / update_asset / consume_asset: you can create non-fungible tokens easily and transfer / exchange them or consume them.
transfer / exchange: you can transfer both fungible and non-fungible assets to others or you can request assets from others. You can even mark your non-fungible asset with a price and anyone who will pay for the price would get the asset (trade), you can even put your asset in a market and everyone else can big for your asset and you choose one bid that satisfy you and finish the transaction.
stake / unstake: you can stake tokens for various purpose, e.g. promote a node to be a validator, participant in a vote, etc.
create_poll / vote: vote for on-chain governance or other purpose.
a blockchain backend. Forge separate the storage engine and consensus engine from upper layer, and currently built on top of tendermint for the consensus engine and ipfs for the storage engine. The consensus engine is for mempool synchronization and reaching agreement on next block (PBFT consensus at the moment, in future we may introduce PoW); the storage engine will store big files across the network, which could be used for various purpose. For all the states tenerated by the execution of transactions, Forge will store them in rocksdb in an authenticated way by using merkle patricia tree(MPT). At the moment we separated the data into several column families: default, account, asset, receipt.
A rich developer interface. Forge ship with GRPC and GraphQL RPC for developers to use it in different situation. If you aim on building a web application, GraphQL RPCs will be your friends; if you're building a forge app that extend the capability of the forge (e.g. adding new tx protocols), GRPC shall be used. Normally the GRPC interface for a node shall not be accessible externally. Inside forge, GraphQL RPC is just a user friendly wrap to GRPC interface, thus they share almost the same capabilities.
Multiple language support. Forge is made to be universally available for various languages. Besides erlang / elixir, we provided nodejs / python SDK, so that you can use nodejs / python to build forge applications. Our forge cli and forge web are built on top of the nodejs SDK.
A rich UI. In the forge ecosystem, we provided forge cli for general purpose administration (for developers), forge web (aka AMC - Arcblock Management Console) for node admin.
For every new release we ship osx and ubuntu binaries. If you're using these two platforms, you can install latest forge-cli:
$ npm install -g @arcblock/forge-cli
And then run:
$ forge init
$ forge start
$ forge web start
Once forge is started, you can open http://localhost:8210 in your browser. Since there's no any data in your chain (if it is your first run), you can run our simulator to inject some random data:
$ forge simulate start
Then refresh your web page, you shall be able to see something like this:
For other platforms you can use our prebuilt docker images:
docker pull arcblock/forge
docker run -it --rm forge # simple run
# run with ui, custom configfile and keep block data
docker run -p 8210:8210 -v ${path_to_keep_data}:/home/arcblock/.forge_release -v ${config_file_fullpath}:/home/arcblock/forge_release.toml -it --rm forge