目前,tendermint 的默认数据库是 LevelDB,但我想使用 mongoDB,但没有找到任何有用的文档。那么,任何人都可以提供帮助,甚至有可能吗?这是可能的,我看到了,但是怎么做呢?
1 回答
3
为 Tendermint 编写 MongoDB 适配器应该很容易。请参阅https://github.com/tendermint/tendermint/issues/803。
- 创建一个新文件 libs/db/mongo_db.go
- 编写惊人的代码示例:https ://github.com/tendermint/tendermint/blob/develop/libs/db/mem_db.go
- 将新的后端 MongoDBBackendStr 添加到 db.go
- 更改本地的tendermint 配置以使用新的后端 db_backend = "mongodb"
- 向我们发送 PR :)
您还可以查看 BigchainDB https://blog.bigchaindb.com/bigchaindb-2-0-is-byzantine-fault-operator-5ffdac96bc44。他们使用 MongoDB 作为主要存储 afaik。
我们的聊天:https ://riot.im/app/#/room/#tendermint:matrix.org 论坛:https ://forum.cosmos.network/c/tendermint
于 2018-12-05T11:50:34.787 回答