A fully user-verified execution layer for Bitcoin's meta-protocols.
The Modular Indexer, which includes Committee Indexer and Light Indexer, introduces a fully user-verified execution layer for Bitcoin's meta-protocols. By leveraging the immutable and decentralized characteristics of Bitcoin, it provides a Turing-complete execution layer, going beyond the limitations of Bitcoin's script language.
Our innovative approach uses Verkle trees for trusted, decentralized data integrity. Even with a majority of hostile modular-indexer-committees, the Modular Indexer reliably connects Bitcoin with complex applications like BRC-20, propelling the ecosystem forward.
For a detailed understanding, refer to our paper: "Modular Indexer: Fully User-Verified Execution Layer for Meta-protocols on Bitcoin".
Stay updated on the latest progress in our L1F Discourse Group.
Committee indexer serves as a key component of Modular Indexer, and is responsible for reading each block of Bitcoin, calculating protocol states, and summarizing these states as a polynomial commitment namely checkpoint. Whenever the committee indexer obtains a new Bitcoin block, it generates a new checkpoint for the protocol and publishes it to the data availability layer for users to access. It is permissionless; anyone can operate his/her committee indexer for a given meta-protocol.
config.json
via the command line.Name
field from config.json
and allow it to be passed via the command line.Before we stepped into the installation, ensure your machine is equipped with the minimum requirements: (We will optimize the Memory Usage soon)
Metric | Minimum Requirements | Recommended Requirements |
---|---|---|
CPU | Single Core | 8 Cores |
Memory | 96 GB | 128 GB |
Disk | 1 TB | 5 TB |
Bandwidth | Upload/Download 100 KB/s | Upload/Download 1 MB/s+ |
We highly appreciate you running the committee indexer to contribute to the decentralization.
Committee indexer is built with Golang. You can run your own one by following the procedure below.
Go
version 1.22.0
is required for running repository. Please visit Golang download Page to get latest Golang installed.
Golang is easy to install all dependence. Fetch all required package by simply running.
go mod tidy
Modular Indexer relies on a running OPI indexer 0.4.1. First, clone the repository to get the necessary files:
# Clone the OPI repository
git clone https://github.com/bestinslot-xyz/OPI.git
Run this command to set up it up after indexing API to latest block:
cd OPI/modules/main_index
node index.js
cp config.example.json config.json
# Tailor config.json according to your setup
See Details of how to set up your own config.json
.
go build
# Run the committee indexer with providing service
./modular-indexer-committee --cfg ./path/to/your/config.json --name "YourServiceName" --url "YourServiceURL" --protocol "meta-protocol" --committee --service
# Run the committee indexer in test mode
./modular-indexer-committee --cfg ./path/to/your/config.json --name "YourServiceName" --committee --service -t --blockheight 780010
Below are the explanation for each of the command flags.
--cfg
: Specify the path of your configuration file. This can be used to point the indexer to a specific configuration file instead of the default config.json.
--name
(-n)
: Indicate the name of the committee indexer service. This is useful for identifying different instances or configurations of the indexer.
--url
(-u)
: Indicate the url of the committee indexer service. Usually this prameter is the public IP address or the domain name of your machine.
--protocol
: Indicate the meta protocol supported by the committee indexer. Currently, only BRC-20 is supported by committee indexer. Please name it as brc-20
by default.
--committee
: This flag activates the committee functionality. When enabled, the committee indexer will publish checkpoints to the DA layer/S3.
--service
(-s)
: Use this flag to activate web service from committee indexer. When enabled, the committee indexer will provide web service for incoming query.
--cache
: By default, the state root cache is enabled, facilitating efficient verkle tree storage. This flag ensures that the application starts with the cache service activated, and will therefore fasten the initialization speed next time.
--test
(-t)
: Enable this flag to activate test mode, allowing the committee indexer to operate up to a specified block height limit. This mode is useful for development and testing by simulating the committee indexer's behavior without catching up to the real latest block.
--blockheight
: When test mode is enabled with -t, this flag sets a fixed maximum block height limit for the committee indexer's operations. It allows for focused testing and performance tuning by limiting the range of blocks the committee indexer processes.
https://docs.nubit.org/modular-indexer/nubit-committee-indexer-apis
Proper configuration of config.json is key for the smooth operation of the Committee Indexer.
database
ConfigurationThe database section requires connection details to the OPI database. If you're running an OPI full node, ensure to provide the correct details as follows:
host
: The IP address or hostname of the machine where database is running.user
: The username for accessing the database.password
: The password associated with the above user account.dbname
: The name of the database you're connecting to.port
: The port number on which your database service is listening.report
ConfigurationDefine where and how to store the checkpoints generated by your committee indexer. The report section currently supports AWS S3 and the Data Availability (DA) layer.
method
: Choose between DA
and S3
for publishing method.timeout
: Timeout setting in milliseconds for publishing checkpoints.DA Configuration:
network
: Specify the network (current: 'Pre-Alpha Testnet').namespaceID
: Your designated namespace identifier. Leave it to empty to create a namespace following the instruction.gasCoupon
: Custom code for managing transaction fees.privateKey
: Your private key for secure transactions.S3 Configuration:
region
: Specify the AWS S3 region for publishing.bucket
: Name of the S3 bucket where checkpoints are stored.accessKey
: Your AWS access key ID.secretKey
: Your AWS secret access key.service
ConfigurationThe service section specifies the details of your API service, enabling access to the Committee Indexer functionalities.
url
: The URL where your API service is hosted and accessible.metaProtocol
: Specify the meta-protocol served by your committee indexer (default 'brc-20').:spider_web: https://www.nubit.org :beetle: https://github.com/RiemaLabs/modular-indexer-committee/issues :book: https://docs.nubit.org/developer-guides/introduction