BridgeFabric is a distributed serverless system based on web3. It aims to build an easy-to-use decentralized governance serverless system, making every piece of function code generates its value, making it easier for users to compute over on-chain or off-chain data.
BridgeFabric is a decentralized serverless platform.
BridgeFabric is a distributed serverless system based on web3. It aims to build an easy-to-use decentralized governance serverless system, making every piece of function code generates value. Developers can write applications and compiling it to WebAssembly. Worker node can run these WebAssembly applications which is call actor in this system. Worker nodes use libp2p to discover and communicate with each other, and each worker node has a unique identity, a nodeid. Worker nodes need to stake and then they can join the system to host applications to earn. Which worker nodes are allowed to participate in the system, and which actor these nodes can host are determined by the on-chain governance contract. Users can write or select the applications they need to use and only need to pay for each call they make. The webAssembly binary applications is currently supported stored on ipfs.
The core purpose of BridgeFabric is to provide a serverless system with decentralized governance to combine the on-chain and off-chain data computing. Users with available computing resources can run worker nodes to provide computing power. Other users can purchase the actor from the market or write their own applications and pay only when these applications are actually called on the worker node.
BridgeFabric is modular designed, and each module can be upgraded so that it can be easily replaced when better technologies and implementations become available.
Users run functional nodes to earn money from idle arithmetic. Function nodes interact via the libp2p protocol to automatically discover other function nodes. The function nodes can run user-specified actor wasm programs on demand, and the function nodes automatically discover the nodes that can run the actor through the actor hosting contract. actor hosting contracts support a variety of ways to define the function nodes on which the actor runs, the two most basic ones being the specified run node method and the smart match method.
BridgeFabric maintains stability and reputation values for each function node, so that users can choose a node to run based on various considerations. (Stability and reputation system is under development)
Worker node is developed based on dapr.
Actor code is in WebAssembly binary format and is stored in distributed storage system. We are currently supporting Filecoin and IPFS as actor code storage.
Each actor has a unique identifier by which the actor can be called. It is not necessary to care about which node executes it at the time of invocation. Its unique identifier is related to the content, and the unique identifier changes whenever the content changes. Since it is stored on the blockchain, the content of the actor can not be changed. When a actor is called, it is called only by the unique identifier.
In development, before the manager node is completed, the user needs to trust the worker node (such as managing these worker node in consortium by several partners trusted each other) or implement the resultant trusted verification by user themself.
Manager nodes are BridgeFabric's chain nodes that maintain the chain state and run system management contracts: reputation system contracts, node stability system contracts, woker node execute result verification contracts, node auto selection contracts, market contracts, etc.
The manager node has built-in verification contract, which also verifies the program results of worker nodes executing actor to prevent malicious or abnormal behavior of worker nodes.
BridgeFabric's governance contract which is unpluggable. It is currently deployed on polygon. It defines the management logic about this system.
BridgeFabric supports invoking user-private actors. Some applications that do not want to be hosted on public BridgeFabric worker node or considering about performance reasons, users can register their own node and its corresponding actor in the management contract. This allows the system to support calling private actor hosting on the node and also running by the same user.
The worker node market displays all the nodes available to users and their key information, such as price, reputation, stability, region, etc.
Actor market is a place to show all public actors avaliable to users.
Users can select wasm actor binary uploaded by other developers from the wasm marketplace.
Developers can upload their wasm actor binary, a functional description of the actor, and provide the corresponding test code for proof of completeness.
Developers can set the fee of the actor code, either free, fixed, or as a percentage of the total cost of a single call. Users who choose to use this actor code will pay only when they are using this actor code.
This project Uses solidity, go, HTML, js language. This project uses web3.storage to store data to filecoin and ipfs, and get data from them. Uses dapr as basic worker node, and add webassembly application actor support for it. Users can write actor or select actor from actor market, users use these actors compute over their data on-chain or off-chain. Actor market and the management dao of BridgeFabric is solidity fevm contract running on filecoin testnet.
Note: This project Participated the Chainlink hackathon. And the function built specifically for the this hackathon are all in fevm branch. These functions are: adding a actor market contract, saving actor description to filecoin, change existing manage contract to fit fevm.