threefoldtecharchive / bcdb

Apache License 2.0
1 stars 0 forks source link

BCDB

BCDB pre-requirements

BCDB uses zdb that is always running on local host ZDB must be running in sequential mode. Please check out 0-db for more information on how to install zdb.

zdb --mode seq

Starting up BCDB

USAGE: bcdb [FLAGS] [OPTIONS] --threebot-id --seed --seed-file [SUBCOMMAND]

FLAGS: -d, --debug enable debug logging -h, --help Prints help information -V, --version Prints version information

OPTIONS: --explorer explorer URL for phonebook entries validations [default: https://explorer.devnet.grid.tf/explorer/] -g, --grpc listen on address for grpc api [default: 0.0.0.0:50051] -i, --threebot-id threebot ID for this bcdb instance -m, --meta directory where metadata is stored [default: /home/azmy/.bcdb-meta] --peers-file path to file with peers list, otherwise use explorer [env: PEERS_FILE=] -r, --rest listen unix socket for rest api [default: /tmp/bcdb.sock] -s, --seed mnemonic of the seed to be used for the identity [env: SEED=] --seed-file path to the file containing the mnemonic [env: seed-file=] -z, --zdb local zdb port [default: 9900]

SUBCOMMANDS: help Prints this message or the help of the given subcommand(s) rebuild rebuild index from zdb


- Index rebuild
```bash
# bcdb rebuild --help
bcdb-rebuild
rebuild index from zdb

USAGE:
    bcdb --threebot-id <id> --seed <seed> --seed-file <seed-file> rebuild [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f, --from <from>    only rebuild index with records after given timestamp

Please make sure that --seed-file is pointing to a seed file generated by the tfuser utility.

Instead, you can provide both --threebot-id and --seed which must be valid identity registered on the provided explorer

playing with bcdb

BCDB exposes a grpc service(s). We already have some clients generated (with some examples) please check clients directory. In case there is no client generated in your preferred language, use the proto/bcdb.proto to generate one.

Example

Please check examples for some example clients that uses bcdb for specific operations.

Checklist