The Metabase engineering team has been working hard and making progress over the last few months. We have a few coding updates from our end which we would like to share with you.
The vasuki library forms the foundation for other features and mechanisms of the Metabase network in the future. Other core features will be built upon the foundational components in the vasuki library. This portion forms the base of Metabase, so developers can be confident that they are building on a secure and solid blockchain network.
- Block files, which defines the structure of the node and block in the network.
- PoW and dPoS mechanisms
- Metabase Virtual Machine
The functions of each file are explained below:
This includes files that will be used by other libraries. This folder contains packages like bitutil, fdlimit, hexutil, mclock etc which will be used in various other packages to perform basic operations and testing. This file’s function will be explained in detail in the next code update.
Includes files like bn256, ecies, sepc256k1 and sha3, which are some of the basic cryptographic algorithms that will be used to perform various encryptions to secure data associated with the blockchain network.
The db package will handle all the functions associated with LevelDb, and also updates the various meters. Additionally, it handles batch objects and holds the functionality to prefix all keys with a given string.
Here, we define files, “event”, “feed”, “subscription”.
Package event deals with the real-time event subscription – it dispatches events to registered receivers, handles subscription for events of a particular type, and sends events to registered receivers of a given type.
Feed implements one to multiple subscriptions, i.e. when the carrier of events is a channel, values sent to Feed will be delivered simultaneously to all subscribed channels.
Package log15 provides an opinionated, simple toolkit for best-practice logging in Go (golang) that is both human and machine readable. It is modeled after the Go standard library’s io and net/http packages and is an alternative to the standard library’s log package.
Handles the creation and updating of all metrics.
Node is the container on which services will be registered. Here, we create a new P2P node for protocol registration. The register function is designed to inject a new service into the node’s stack. Function start creates a live P2P node and runs it. A set of functions are then defined to start all various RPC endpoint during node startup, they also handle the initialization of various RPC endpoints, as well as their termination.
A peer is a connected remote node. P2P handles the processes associated with communication between the two nodes. For example, to know the capabilities (supported subprotocols) of the remote peer, to get the remote or local address of network connection, terminating the connection for a given reason, and other communication processes.
Recursive Length Prefix is an encoding/decoding mechanism which will be used for data serialization. This mechanism allows you to store and transmit complex data. The explanation of how encryption and decryption take place can be found here.
Remote Procedure Call is a package that provides access to the exported methods of an object across a network or other I/O connection.