You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@resilientdb.apache.org by da...@apache.org on 2025/05/03 05:15:03 UTC
(incubator-resilientdb) 01/01: hs1 with tpcc initial commit
This is an automated email from the ASF dual-hosted git repository.
dakaikang pushed a commit to branch hs1_tpcc
in repository https://gitbox.apache.org/repos/asf/incubator-resilientdb.git
commit e076b1443f0d5b93c775497d9a9bd0e8c062e432
Author: DakaiKang <49...@qq.com>
AuthorDate: Sat May 3 05:13:58 2025 +0000
hs1 with tpcc initial commit
---
.asf.yaml | 40 +
.bazelrc | 4 +
.clang-format | 168 ++
.github/workflows/build-push.yml | 0
.github/workflows/build.yml | 26 +
.github/workflows/loc.yml | 37 +
.github/workflows/main.yml | 28 +
.github/workflows/ut.yml | 24 +
.gitignore | 14 +
BUILD.bazel | 16 +
CHANGELOG.md | 0
CNAME | 1 +
CODE_OF_CONDUCT.md | 76 +
Docker/Dockerfile | 37 +
Docker/Dockerfile_mac | 34 +
INSTALL.sh | 44 +
INSTALL_MAC.sh | 21 +
LICENSE | 201 ++
MODULE.bazel | 6 +
MODULE.bazel.lock | 1632 +++++++++++
NOTICE | 5 +
README.md | 99 +
WORKSPACE | 226 ++
action.yml | 53 +
benchmark/protocols/hs/BUILD | 16 +
benchmark/protocols/hs/kv_server_performance.cpp | 88 +
benchmark/protocols/hs1/BUILD | 16 +
benchmark/protocols/hs1/kv_server_performance.cpp | 88 +
benchmark/protocols/hs2/BUILD | 16 +
benchmark/protocols/hs2/kv_server_performance.cpp | 88 +
benchmark/protocols/slot_hs1/BUILD | 16 +
.../protocols/slot_hs1/kv_server_performance.cpp | 88 +
chain/state/BUILD | 20 +
chain/state/chain_state.cpp | 44 +
chain/state/chain_state.h | 42 +
chain/state/chain_state_test.cpp | 65 +
chain/storage/BUILD | 64 +
chain/storage/kv_storage_test.cpp | 232 ++
chain/storage/leveldb.cpp | 290 ++
chain/storage/leveldb.h | 81 +
chain/storage/memory_db.cpp | 170 ++
chain/storage/memory_db.h | 88 +
chain/storage/mock_storage.h | 56 +
chain/storage/proto/BUILD | 36 +
chain/storage/proto/kv.proto | 13 +
chain/storage/proto/leveldb_config.proto | 9 +
chain/storage/proto/rocksdb_config.proto | 11 +
chain/storage/rocksdb.cpp | 291 ++
chain/storage/rocksdb.h | 80 +
chain/storage/setting/BUILD | 31 +
chain/storage/storage.h | 60 +
common/BUILD | 60 +
common/crypto/BUILD | 85 +
common/crypto/hash.cpp | 54 +
common/crypto/hash.h | 37 +
common/crypto/hash_test.cpp | 56 +
common/crypto/key_generator.cpp | 162 ++
common/crypto/key_generator.h | 37 +
common/crypto/mock_signature_verifier.h | 41 +
common/crypto/signature_utils.cpp | 153 ++
common/crypto/signature_utils.h | 46 +
common/crypto/signature_verifier.cpp | 285 ++
common/crypto/signature_verifier.h | 89 +
common/crypto/signature_verifier_interface.cpp | 35 +
common/crypto/signature_verifier_interface.h | 43 +
common/crypto/signature_verifier_test.cpp | 166 ++
common/proto/BUILD | 20 +
common/proto/signature_info.proto | 61 +
common/test/BUILD | 43 +
common/test/json_test.cpp | 61 +
common/test/test.proto | 15 +
common/test/test_macros.h | 53 +
common/utils/BUILD | 7 +
common/utils/utils.cpp | 42 +
common/utils/utils.h | 34 +
documents/doxygen/.gitignore | 2 +
documents/doxygen/Doxyfile | 2780 +++++++++++++++++++
documents/doxygen/DoxygenLayout.xml | 240 ++
documents/doxygen/doxygen_html_style.css | 4 +
documents/doxygen/header | 60 +
documents/doxygen/logo.png | Bin 0 -> 71672 bytes
documents/file/Nexres-1654906717062.json | 2893 ++++++++++++++++++++
documents/file/prometheus.yml | 47 +
documents/image/dashboard/import.png | Bin 0 -> 11682 bytes
documents/image/dashboard/resolution.png | Bin 0 -> 38037 bytes
documents/image/dashboard/target list.png | Bin 0 -> 138486 bytes
documents/image/dashboard/target.png | Bin 0 -> 40734 bytes
documents/image/dashboard/yml_config.png | Bin 0 -> 61559 bytes
documents/image/dashboard/yml_interval.png | Bin 0 -> 17770 bytes
entrypoint.sh | 4 +
executor/common/BUILD | 51 +
executor/common/custom_query.h | 36 +
executor/common/mock_transaction_manager.h | 43 +
executor/common/tpcc_executor.cpp | 961 +++++++
executor/common/tpcc_executor.h | 56 +
executor/common/transaction_manager.cpp | 121 +
executor/common/transaction_manager.h | 72 +
executor/contract/executor/BUILD | 27 +
executor/contract/executor/contract_executor.cpp | 121 +
executor/contract/executor/contract_executor.h | 50 +
.../contract/executor/contract_executor_test.cpp | 264 ++
executor/contract/executor/test_data/BUILD | 1 +
executor/contract/executor/test_data/contract.json | 19 +
executor/contract/manager/BUILD | 53 +
executor/contract/manager/address_manager.cpp | 54 +
executor/contract/manager/address_manager.h | 47 +
executor/contract/manager/address_manager_test.cpp | 51 +
executor/contract/manager/contract_manager.cpp | 148 +
executor/contract/manager/contract_manager.h | 60 +
.../contract/manager/contract_manager_test.cpp | 252 ++
executor/contract/manager/test_data/BUILD | 1 +
executor/contract/manager/test_data/contract.json | 19 +
executor/contract/manager/utils.h | 30 +
executor/kv/BUILD | 26 +
executor/kv/kv_executor.cpp | 197 ++
executor/kv/kv_executor.h | 63 +
executor/kv/kv_executor_test.cpp | 343 +++
executor/utxo/executor/BUILD | 28 +
executor/utxo/executor/utxo_executor.cpp | 79 +
executor/utxo/executor/utxo_executor.h | 57 +
executor/utxo/executor/utxo_executor_test.cpp | 80 +
executor/utxo/manager/BUILD | 64 +
executor/utxo/manager/transaction.cpp | 190 ++
executor/utxo/manager/transaction.h | 56 +
executor/utxo/manager/transaction_test.cpp | 117 +
executor/utxo/manager/tx_mempool.cpp | 128 +
executor/utxo/manager/tx_mempool.h | 55 +
executor/utxo/manager/tx_mempool_test.cpp | 196 ++
executor/utxo/manager/wallet.cpp | 38 +
executor/utxo/manager/wallet.h | 41 +
executor/utxo/manager/wallet_test.cpp | 40 +
hotstuff1-extended-version.pdf | Bin 0 -> 802950 bytes
img/apache-incubator.png | Bin 0 -> 30207 bytes
img/apache-resdb.png | Bin 0 -> 98785 bytes
img/nexres.jpg | Bin 0 -> 71181 bytes
img/nexres.pdf | Bin 0 -> 35993 bytes
img/nexres.png | Bin 0 -> 72738 bytes
img/resdb-v2.png | Bin 0 -> 41784 bytes
img/resdb.png | Bin 0 -> 36015 bytes
interface/common/BUILD | 55 +
interface/common/mock_resdb_txn_accessor.h | 37 +
interface/common/resdb_state_accessor.cpp | 72 +
interface/common/resdb_state_accessor.h | 47 +
interface/common/resdb_state_accessor_test.cpp | 114 +
interface/common/resdb_txn_accessor.cpp | 150 +
interface/common/resdb_txn_accessor.h | 53 +
interface/common/resdb_txn_accessor_test.cpp | 159 ++
interface/contract/BUILD | 14 +
interface/contract/contract_client.cpp | 121 +
interface/contract/contract_client.h | 47 +
interface/kv/BUILD | 11 +
interface/kv/kv_client.cpp | 148 +
interface/kv/kv_client.h | 66 +
interface/rdbc/BUILD | 59 +
interface/rdbc/mock_net_channel.h | 42 +
interface/rdbc/mock_resdb_txn_accessor.h | 37 +
interface/rdbc/net_channel.cpp | 231 ++
interface/rdbc/net_channel.h | 109 +
interface/rdbc/net_channel_test.cpp | 214 ++
interface/rdbc/transaction_constructor.cpp | 89 +
interface/rdbc/transaction_constructor.h | 51 +
interface/rdbc/transaction_constructor_test.cpp | 160 ++
interface/utxo/BUILD | 12 +
interface/utxo/utxo_client.cpp | 98 +
interface/utxo/utxo_client.h | 40 +
monitoring/README.md | 34 +
monitoring/prometheus/prometheus.yml | 55 +
node_modules/@actions/core/README.md | 146 +
node_modules/@actions/core/lib/command.d.ts | 16 +
node_modules/@actions/core/lib/command.js | 78 +
node_modules/@actions/core/lib/command.js.map | 1 +
node_modules/@actions/core/lib/core.d.ts | 116 +
node_modules/@actions/core/lib/core.js | 209 ++
node_modules/@actions/core/lib/core.js.map | 1 +
node_modules/@actions/core/package.json | 67 +
node_modules/badgen/LICENSE.md | 5 +
node_modules/badgen/README.md | 83 +
node_modules/badgen/dist/calc-text-width.d.ts | 1 +
node_modules/badgen/dist/color-presets.d.ts | 14 +
node_modules/badgen/dist/index.d.ts | 19 +
node_modules/badgen/dist/index.js | 2 +
node_modules/badgen/dist/index.js.map | 1 +
node_modules/badgen/package.json | 65 +
node_modules/badgen/tsconfig.json | 18 +
node_modules/balanced-match/.npmignore | 5 +
node_modules/balanced-match/LICENSE.md | 21 +
node_modules/balanced-match/README.md | 91 +
node_modules/balanced-match/index.js | 59 +
node_modules/balanced-match/package.json | 77 +
node_modules/brace-expansion/LICENSE | 21 +
node_modules/brace-expansion/README.md | 129 +
node_modules/brace-expansion/index.js | 201 ++
node_modules/brace-expansion/package.json | 75 +
node_modules/concat-map/.travis.yml | 4 +
node_modules/concat-map/LICENSE | 18 +
node_modules/concat-map/README.markdown | 62 +
node_modules/concat-map/example/map.js | 6 +
node_modules/concat-map/index.js | 13 +
node_modules/concat-map/package.json | 88 +
node_modules/concat-map/test/map.js | 39 +
node_modules/fs.realpath/LICENSE | 43 +
node_modules/fs.realpath/README.md | 33 +
node_modules/fs.realpath/index.js | 66 +
node_modules/fs.realpath/old.js | 303 ++
node_modules/fs.realpath/package.json | 59 +
node_modules/glob-gitignore/HISTORY.md | 1 +
node_modules/glob-gitignore/LICENSE | 21 +
node_modules/glob-gitignore/README.md | 121 +
node_modules/glob-gitignore/package.json | 85 +
node_modules/glob-gitignore/src/glob.js | 68 +
node_modules/glob-gitignore/src/index.js | 15 +
node_modules/glob-gitignore/src/sync.js | 50 +
node_modules/glob-gitignore/src/util.js | 137 +
node_modules/glob/LICENSE | 21 +
node_modules/glob/README.md | 375 +++
node_modules/glob/changelog.md | 67 +
node_modules/glob/common.js | 240 ++
node_modules/glob/glob.js | 790 ++++++
node_modules/glob/package.json | 80 +
node_modules/glob/sync.js | 486 ++++
node_modules/ignore/CHANGELOG.md | 32 +
node_modules/ignore/LICENSE-MIT | 21 +
node_modules/ignore/README.md | 386 +++
node_modules/ignore/index.d.ts | 63 +
node_modules/ignore/index.js | 568 ++++
node_modules/ignore/legacy.js | 476 ++++
node_modules/ignore/package.json | 98 +
node_modules/inflight/LICENSE | 15 +
node_modules/inflight/README.md | 37 +
node_modules/inflight/inflight.js | 54 +
node_modules/inflight/package.json | 58 +
node_modules/inherits/LICENSE | 16 +
node_modules/inherits/README.md | 42 +
node_modules/inherits/inherits.js | 9 +
node_modules/inherits/inherits_browser.js | 27 +
node_modules/inherits/package.json | 61 +
node_modules/lodash.difference/LICENSE | 47 +
node_modules/lodash.difference/README.md | 18 +
node_modules/lodash.difference/index.js | 1170 ++++++++
node_modules/lodash.difference/package.json | 69 +
node_modules/lodash.union/LICENSE | 47 +
node_modules/lodash.union/README.md | 18 +
node_modules/lodash.union/index.js | 1181 ++++++++
node_modules/lodash.union/package.json | 69 +
node_modules/make-array/README.md | 61 +
node_modules/make-array/index.js | 71 +
node_modules/make-array/package.json | 69 +
node_modules/minimatch/LICENSE | 15 +
node_modules/minimatch/README.md | 209 ++
node_modules/minimatch/minimatch.js | 923 +++++++
node_modules/minimatch/package.json | 63 +
node_modules/once/LICENSE | 15 +
node_modules/once/README.md | 79 +
node_modules/once/once.js | 42 +
node_modules/once/package.json | 67 +
node_modules/path-is-absolute/index.js | 20 +
node_modules/path-is-absolute/license | 21 +
node_modules/path-is-absolute/package.json | 75 +
node_modules/path-is-absolute/readme.md | 59 +
node_modules/util.inherits/HISTORY.md | 1 +
node_modules/util.inherits/README.md | 45 +
node_modules/util.inherits/index.js | 47 +
node_modules/util.inherits/package.json | 81 +
node_modules/wrappy/LICENSE | 15 +
node_modules/wrappy/README.md | 36 +
node_modules/wrappy/package.json | 59 +
node_modules/wrappy/wrappy.js | 33 +
package-lock.json | 11 +
platform/common/data_comm/BUILD | 17 +
platform/common/data_comm/data_comm.h | 39 +
platform/common/data_comm/network_comm.h | 32 +
platform/common/network/BUILD | 40 +
platform/common/network/mock_socket.h | 43 +
platform/common/network/network_utils.cpp | 50 +
platform/common/network/network_utils.h | 32 +
platform/common/network/network_utils_test.cpp | 43 +
platform/common/network/socket.h | 51 +
platform/common/network/tcp_socket.cpp | 237 ++
platform/common/network/tcp_socket.h | 59 +
platform/common/network/tcp_socket_test.cpp | 94 +
platform/common/queue/BUILD | 47 +
platform/common/queue/batch_queue.h | 79 +
platform/common/queue/batch_queue_test.cpp | 98 +
platform/common/queue/blocking_queue.h | 106 +
platform/common/queue/lock_free_queue.h | 80 +
platform/common/queue/lock_free_queue_test.cpp | 50 +
platform/config/BUILD | 38 +
platform/config/resdb_config.cpp | 312 +++
platform/config/resdb_config.h | 179 ++
platform/config/resdb_config_test.cpp | 126 +
platform/config/resdb_config_utils.cpp | 157 ++
platform/config/resdb_config_utils.h | 43 +
platform/config/resdb_poc_config.cpp | 74 +
platform/config/resdb_poc_config.h | 71 +
platform/consensus/checkpoint/BUILD | 18 +
platform/consensus/checkpoint/checkpoint.h | 32 +
platform/consensus/checkpoint/mock_checkpoint.h | 33 +
platform/consensus/execution/BUILD | 114 +
platform/consensus/execution/duplicate_manager.cpp | 143 +
platform/consensus/execution/duplicate_manager.h | 69 +
.../consensus/execution/geo_global_executor.cpp | 131 +
platform/consensus/execution/geo_global_executor.h | 70 +
.../execution/geo_global_executor_test.cpp | 95 +
.../execution/geo_transaction_executor.cpp | 127 +
.../consensus/execution/geo_transaction_executor.h | 58 +
.../execution/geo_transaction_executor_test.cpp | 150 +
.../consensus/execution/mock_geo_global_executor.h | 37 +
platform/consensus/execution/system_info.cpp | 75 +
platform/consensus/execution/system_info.h | 54 +
platform/consensus/execution/system_info_test.cpp | 75 +
.../consensus/execution/transaction_executor.cpp | 597 ++++
.../consensus/execution/transaction_executor.h | 150 +
.../execution/transaction_executor_test.cpp | 282 ++
platform/consensus/ordering/common/BUILD | 11 +
platform/consensus/ordering/common/algorithm/BUILD | 12 +
.../ordering/common/algorithm/protocol_base.cpp | 77 +
.../ordering/common/algorithm/protocol_base.h | 81 +
platform/consensus/ordering/common/framework/BUILD | 69 +
.../ordering/common/framework/consensus.cpp | 225 ++
.../ordering/common/framework/consensus.h | 83 +
.../common/framework/performance_manager.cpp | 341 +++
.../common/framework/performance_manager.h | 123 +
.../ordering/common/framework/response_manager.cpp | 242 ++
.../ordering/common/framework/response_manager.h | 85 +
.../consensus/ordering/common/framework/tpcc.cpp | 184 ++
.../consensus/ordering/common/framework/tpcc.h | 104 +
.../common/framework/transaction_utils.cpp | 49 +
.../ordering/common/framework/transaction_utils.h | 46 +
.../ordering/common/transaction_utils.cpp | 41 +
.../consensus/ordering/common/transaction_utils.h | 33 +
platform/consensus/ordering/hs/algorithm/BUILD | 30 +
platform/consensus/ordering/hs/algorithm/hs.cpp | 223 ++
platform/consensus/ordering/hs/algorithm/hs.h | 66 +
.../ordering/hs/algorithm/proposal_manager.cpp | 171 ++
.../ordering/hs/algorithm/proposal_manager.h | 51 +
platform/consensus/ordering/hs/framework/BUILD | 28 +
.../consensus/ordering/hs/framework/consensus.cpp | 113 +
.../consensus/ordering/hs/framework/consensus.h | 56 +
.../ordering/hs/framework/performance_manager.cpp | 116 +
.../ordering/hs/framework/performance_manager.h | 49 +
platform/consensus/ordering/hs/proto/BUILD | 16 +
.../consensus/ordering/hs/proto/proposal.proto | 60 +
platform/consensus/ordering/hs1/algorithm/BUILD | 30 +
platform/consensus/ordering/hs1/algorithm/hs1.cpp | 243 ++
platform/consensus/ordering/hs1/algorithm/hs1.h | 67 +
.../ordering/hs1/algorithm/proposal_manager.cpp | 198 ++
.../ordering/hs1/algorithm/proposal_manager.h | 53 +
platform/consensus/ordering/hs1/framework/BUILD | 28 +
.../consensus/ordering/hs1/framework/consensus.cpp | 114 +
.../consensus/ordering/hs1/framework/consensus.h | 56 +
.../ordering/hs1/framework/performance_manager.cpp | 117 +
.../ordering/hs1/framework/performance_manager.h | 49 +
platform/consensus/ordering/hs1/proto/BUILD | 16 +
.../consensus/ordering/hs1/proto/proposal.proto | 60 +
platform/consensus/ordering/hs2/algorithm/BUILD | 30 +
platform/consensus/ordering/hs2/algorithm/hs2.cpp | 224 ++
platform/consensus/ordering/hs2/algorithm/hs2.h | 65 +
.../ordering/hs2/algorithm/proposal_manager.cpp | 177 ++
.../ordering/hs2/algorithm/proposal_manager.h | 53 +
platform/consensus/ordering/hs2/framework/BUILD | 29 +
.../consensus/ordering/hs2/framework/consensus.cpp | 112 +
.../consensus/ordering/hs2/framework/consensus.h | 56 +
.../ordering/hs2/framework/performance_manager.cpp | 116 +
.../ordering/hs2/framework/performance_manager.h | 49 +
platform/consensus/ordering/hs2/proto/BUILD | 16 +
.../consensus/ordering/hs2/proto/proposal.proto | 60 +
.../consensus/ordering/slot_hs1/algorithm/BUILD | 28 +
.../slot_hs1/algorithm/proposal_manager.cpp | 221 ++
.../ordering/slot_hs1/algorithm/proposal_manager.h | 54 +
.../ordering/slot_hs1/algorithm/slot_hs1.cpp | 295 ++
.../ordering/slot_hs1/algorithm/slot_hs1.h | 72 +
.../consensus/ordering/slot_hs1/framework/BUILD | 28 +
.../ordering/slot_hs1/framework/consensus.cpp | 116 +
.../ordering/slot_hs1/framework/consensus.h | 56 +
.../slot_hs1/framework/performance_manager.cpp | 203 ++
.../slot_hs1/framework/performance_manager.h | 57 +
platform/consensus/ordering/slot_hs1/proto/BUILD | 16 +
.../ordering/slot_hs1/proto/proposal.proto | 63 +
platform/consensus/recovery/BUILD | 29 +
platform/consensus/recovery/recovery.cpp | 527 ++++
platform/consensus/recovery/recovery.h | 106 +
platform/consensus/recovery/recovery_test.cpp | 462 ++++
platform/networkstrate/BUILD | 181 ++
platform/networkstrate/README.md | 17 +
platform/networkstrate/async_acceptor.cpp | 164 ++
platform/networkstrate/async_acceptor.h | 76 +
platform/networkstrate/async_acceptor_test.cpp | 135 +
platform/networkstrate/async_replica_client.cpp | 114 +
platform/networkstrate/async_replica_client.h | 63 +
.../networkstrate/async_replica_client_test.cpp | 170 ++
platform/networkstrate/consensus_manager.cpp | 346 +++
platform/networkstrate/consensus_manager.h | 111 +
platform/networkstrate/consensus_manager_test.cpp | 303 ++
platform/networkstrate/mock_async_replica_client.h | 35 +
platform/networkstrate/mock_replica_communicator.h | 49 +
platform/networkstrate/mock_service_interface.h | 37 +
platform/networkstrate/replica_communicator.cpp | 266 ++
platform/networkstrate/replica_communicator.h | 98 +
.../networkstrate/replica_communicator_test.cpp | 139 +
platform/networkstrate/server_comm.h | 32 +
platform/networkstrate/service_interface.cpp | 38 +
platform/networkstrate/service_interface.h | 47 +
platform/networkstrate/service_network.cpp | 140 +
platform/networkstrate/service_network.h | 68 +
platform/networkstrate/service_network_test.cpp | 116 +
platform/proto/BUILD | 150 +
platform/proto/broadcast.proto | 7 +
platform/proto/checkpoint_info.proto | 25 +
platform/proto/client_test.proto | 11 +
platform/proto/logging.proto | 18 +
platform/proto/network_type.proto | 10 +
platform/proto/replica_info.proto | 68 +
platform/proto/resdb.proto | 190 ++
platform/proto/system_info_data.proto | 8 +
platform/proto/tpcc.proto | 77 +
platform/proto/viewchange_message.proto | 30 +
platform/rdbc/BUILD | 16 +
platform/rdbc/acceptor.cpp | 98 +
platform/rdbc/acceptor.h | 57 +
platform/statistic/BUILD | 31 +
platform/statistic/README.md | 169 ++
platform/statistic/prometheus_handler.cpp | 108 +
platform/statistic/prometheus_handler.h | 79 +
platform/statistic/set_random_data.cpp | 86 +
platform/statistic/stats.cpp | 765 ++++++
platform/statistic/stats.h | 145 +
platform/statistic/test_server.sh | 8 +
platform/test/BUILD | 19 +
platform/test/proto/BUILD | 14 +
platform/test/proto/resdb_test.proto | 10 +
platform/test/resdb_test.cpp | 168 ++
platform/test/test_data/BUILD | 6 +
platform/test/test_data/admin.key.pri | 2 +
platform/test/test_data/admin.key.pub | 2 +
platform/test/test_data/cert_1.cert | 7 +
platform/test/test_data/cert_2.cert | Bin 0 -> 167 bytes
platform/test/test_data/cert_3.cert | 8 +
platform/test/test_data/cert_4.cert | 6 +
platform/test/test_data/cert_5.cert | 7 +
platform/test/test_data/cert_6.cert | 7 +
platform/test/test_data/kv_config.config | 27 +
platform/test/test_data/node1.key.pri | 2 +
platform/test/test_data/node1.key.pub | 3 +
platform/test/test_data/node2.key.pri | 2 +
platform/test/test_data/node2.key.pub | 2 +
platform/test/test_data/node3.key.pri | Bin 0 -> 36 bytes
platform/test/test_data/node3.key.pub | 3 +
platform/test/test_data/node4.key.pri | Bin 0 -> 36 bytes
platform/test/test_data/node4.key.pub | 2 +
platform/test/test_data/node5.key.pri | 2 +
platform/test/test_data/node5.key.pub | 3 +
platform/test/test_data/server.config | 27 +
proto/contract/BUILD | 49 +
proto/contract/account.proto | 9 +
proto/contract/contract.proto | 11 +
proto/contract/func_params.proto | 21 +
proto/contract/rpc.proto | 31 +
proto/kv/BUILD | 14 +
proto/kv/kv.proto | 53 +
proto/utxo/BUILD | 36 +
proto/utxo/config.proto | 15 +
proto/utxo/rpc.proto | 25 +
proto/utxo/utxo.proto | 23 +
repositories.bzl | 90 +
resilientdb_tpcc.db | Bin 0 -> 90861568 bytes
scripts/deploy/README.md | 46 +
scripts/deploy/config/hs.config | 15 +
scripts/deploy/config/hs1.config | 16 +
scripts/deploy/config/hs2.config | 15 +
scripts/deploy/config/key_example.conf | 2 +
scripts/deploy/config/kv_performance_server.conf | 12 +
scripts/deploy/config/kv_server.conf | 8 +
scripts/deploy/config/slot_hs1.config | 16 +
scripts/deploy/config/template.config | 10 +
scripts/deploy/data/cert/admin.key.pri | 2 +
scripts/deploy/data/cert/admin.key.pub | 2 +
scripts/deploy/data/cert/cert_1.cert | Bin 0 -> 166 bytes
scripts/deploy/data/cert/cert_2.cert | 7 +
scripts/deploy/data/cert/cert_3.cert | 7 +
scripts/deploy/data/cert/cert_4.cert | 6 +
scripts/deploy/data/cert/cert_5.cert | 8 +
scripts/deploy/data/cert/cert_6.cert | Bin 0 -> 166 bytes
scripts/deploy/data/cert/cert_7.cert | 6 +
scripts/deploy/data/cert/cert_8.cert | Bin 0 -> 166 bytes
scripts/deploy/data/cert/cert_9.cert | 7 +
scripts/deploy/data/cert/node1.key.pri | 2 +
scripts/deploy/data/cert/node1.key.pub | 3 +
scripts/deploy/data/cert/node2.key.pri | 2 +
scripts/deploy/data/cert/node2.key.pub | 2 +
scripts/deploy/data/cert/node3.key.pri | Bin 0 -> 36 bytes
scripts/deploy/data/cert/node3.key.pub | 3 +
scripts/deploy/data/cert/node4.key.pri | Bin 0 -> 36 bytes
scripts/deploy/data/cert/node4.key.pub | 2 +
scripts/deploy/data/cert/node5.key.pri | 2 +
scripts/deploy/data/cert/node5.key.pub | 3 +
scripts/deploy/data/cert/node6.key.key.pri | 2 +
scripts/deploy/data/cert/node6.key.key.pub | 2 +
scripts/deploy/data/cert/node6.key.pri | 2 +
scripts/deploy/data/cert/node6.key.pub | 2 +
scripts/deploy/data/cert/node7.key.key.pri | 2 +
scripts/deploy/data/cert/node7.key.key.pub | 2 +
scripts/deploy/data/cert/node7.key.pri | 2 +
scripts/deploy/data/cert/node7.key.pub | 2 +
scripts/deploy/data/cert/node8.key.key.pri | 2 +
scripts/deploy/data/cert/node8.key.key.pub | 2 +
scripts/deploy/data/cert/node8.key.pri | 2 +
scripts/deploy/data/cert/node8.key.pub | 2 +
scripts/deploy/data/cert/node9.key.key.pri | 2 +
scripts/deploy/data/cert/node9.key.key.pub | 2 +
scripts/deploy/data/cert/node9.key.pri | 2 +
scripts/deploy/data/cert/node9.key.pub | 2 +
scripts/deploy/performance/calculate_result.py | 162 ++
scripts/deploy/performance/hs1_performance.sh | 4 +
scripts/deploy/performance/hs2_performance.sh | 4 +
scripts/deploy/performance/hs_performance.sh | 4 +
scripts/deploy/performance/run_performance.sh | 59 +
scripts/deploy/performance/slot_hs1_performance.sh | 4 +
scripts/deploy/poe_performance.sh | 6 +
scripts/deploy/script/copy_local_db.sh | 27 +
scripts/deploy/script/copy_tpcc_db_file.sh | 37 +
scripts/deploy/script/deploy.sh | 150 +
scripts/deploy/script/env.sh | 27 +
scripts/deploy/script/generate_config.sh | 77 +
scripts/deploy/script/generate_key.sh | 16 +
scripts/deploy/script/load_config.sh | 8 +
scripts/format.sh | 2 +
scripts/null | 1 +
service/contract/BUILD | 12 +
service/contract/contract_service.cpp | 70 +
service/kv/BUILD | 25 +
service/kv/kv_service.cpp | 88 +
service/tools/config/interface/service.config | 3 +
service/tools/config/interface/service0.config | 3 +
service/tools/config/server/server.config | 38 +
service/tools/config/server/utxo_config.config | 12 +
service/tools/contract/README.md | 19 +
service/tools/contract/api_tools/BUILD | 12 +
.../tools/contract/api_tools/client_config.config | 1 +
.../contract/api_tools/config/server_config.config | 28 +
.../tools/contract/api_tools/contract_tools.cpp | 141 +
.../contract/api_tools/example_contract/compile.sh | 2 +
.../contract/api_tools/example_contract/token.json | 15 +
.../contract/api_tools/example_contract/token.sol | 31 +
.../service_tools/start_contract_service.sh | 14 +
service/tools/data/cert/admin.key.pri | 2 +
service/tools/data/cert/admin.key.pub | 2 +
service/tools/data/cert/cert_1.cert | Bin 0 -> 166 bytes
service/tools/data/cert/cert_2.cert | 7 +
service/tools/data/cert/cert_3.cert | 7 +
service/tools/data/cert/cert_4.cert | 6 +
service/tools/data/cert/cert_5.cert | 8 +
service/tools/data/cert/cert_6.cert | Bin 0 -> 166 bytes
service/tools/data/cert/cert_7.cert | 6 +
service/tools/data/cert/cert_8.cert | Bin 0 -> 166 bytes
service/tools/data/cert/cert_9.cert | 7 +
service/tools/data/cert/node1.key.pri | 2 +
service/tools/data/cert/node1.key.pub | 3 +
service/tools/data/cert/node2.key.pri | 2 +
service/tools/data/cert/node2.key.pub | 2 +
service/tools/data/cert/node3.key.pri | Bin 0 -> 36 bytes
service/tools/data/cert/node3.key.pub | 3 +
service/tools/data/cert/node4.key.pri | Bin 0 -> 36 bytes
service/tools/data/cert/node4.key.pub | 2 +
service/tools/data/cert/node5.key.pri | 2 +
service/tools/data/cert/node5.key.pub | 3 +
service/tools/data/cert/node6.key.key.pri | 2 +
service/tools/data/cert/node6.key.key.pub | 2 +
service/tools/data/cert/node6.key.pri | 2 +
service/tools/data/cert/node6.key.pub | 2 +
service/tools/data/cert/node7.key.key.pri | 2 +
service/tools/data/cert/node7.key.key.pub | 2 +
service/tools/data/cert/node7.key.pri | 2 +
service/tools/data/cert/node7.key.pub | 2 +
service/tools/data/cert/node8.key.key.pri | 2 +
service/tools/data/cert/node8.key.key.pub | 2 +
service/tools/data/cert/node8.key.pri | 2 +
service/tools/data/cert/node8.key.pub | 2 +
service/tools/data/cert/node9.key.key.pri | 2 +
service/tools/data/cert/node9.key.key.pub | 2 +
service/tools/data/cert/node9.key.pri | 2 +
service/tools/data/cert/node9.key.pub | 2 +
service/tools/kv/api_tools/BUILD | 21 +
service/tools/kv/api_tools/kv_client_txn_tools.cpp | 69 +
service/tools/kv/api_tools/kv_service_tools.cpp | 280 ++
service/tools/kv/server_tools/start_kv_service.sh | 14 +
.../kv/server_tools/start_kv_service_monitoring.sh | 15 +
service/tools/utxo/README.md | 36 +
.../tools/utxo/service_tools/start_utxo_service.sh | 16 +
service/tools/utxo/wallet_tool/cpp/BUILD | 29 +
service/tools/utxo/wallet_tool/cpp/addr_utils.cpp | 46 +
service/tools/utxo/wallet_tool/cpp/addr_utils.h | 37 +
.../utxo/wallet_tool/cpp/client_config.config | 1 +
service/tools/utxo/wallet_tool/cpp/key_utils.cpp | 41 +
service/tools/utxo/wallet_tool/cpp/key_utils.h | 35 +
.../utxo/wallet_tool/cpp/server_config0.config | 1 +
.../utxo/wallet_tool/cpp/utxo_client_tools.cpp | 182 ++
service/tools/utxo/wallet_tool/py/BUILD | 21 +
service/tools/utxo/wallet_tool/py/addr.py | 32 +
service/tools/utxo/wallet_tool/py/keys.py | 26 +
service/tools/utxo/wallet_tool/pybind/BUILD | 19 +
.../utxo/wallet_tool/pybind/wallet_tools_py.cpp | 43 +
service/tools/utxo/wallet_tool/test/BUILD | 29 +
service/tools/utxo/wallet_tool/test/key_tester.py | 26 +
.../utxo/wallet_tool/test/key_tester_utils.cpp | 47 +
service/utils/BUILD | 12 +
service/utils/server_factory.cpp | 48 +
service/utils/server_factory.h | 124 +
service/utxo/BUILD | 11 +
service/utxo/config/server_config.config | 28 +
service/utxo/config/utxo_config.config | 12 +
service/utxo/start_contract_server.sh | 14 +
service/utxo/utxo_service.cpp | 96 +
src/index.js | 108 +
third_party/BUILD | 47 +
third_party/asio.BUILD | 19 +
third_party/civetweb.BUILD | 30 +
third_party/crow.BUILD | 19 +
third_party/date.BUILD | 11 +
third_party/eEVM.BUILD | 36 +
third_party/json.BUILD | 10 +
third_party/leveldb.BUILD | 31 +
third_party/prometheus.BUILD | 11 +
third_party/rapidjson.BUILD | 8 +
third_party/rocksdb.BUILD | 98 +
third_party/snappy.BUILD | 53 +
third_party/z.BUILD | 16 +
third_party/zlib.BUILD | 41 +
third_party/zstd.BUILD | 5 +
tools/BUILD | 60 +
tools/certificate_tools.cpp | 137 +
tools/certificate_tools_test.cpp | 95 +
tools/generate_certificate.sh | 37 +
tools/generate_client.sh | 4 +
tools/generate_cluster.sh | 12 +
tools/generate_key.sh | 3 +
tools/generate_mulregion_config.py | 69 +
tools/generate_region_config.py | 84 +
tools/key_generator_tools.cpp | 82 +
tools/resdb_state_accessor_tools.cpp | 45 +
tools/resdb_txn_accessor_tools.cpp | 58 +
tpcc_initialization.cpp | 587 ++++
641 files changed, 52688 insertions(+)
diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 00000000..cfb2ed0e
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+github:
+ description: Global-Scale Sustainable Blockchain Fabric
+ #homepage: resilientdb.apache.org
+ labels:
+ - crypto
+ - smart-contracts
+ - blockchain
+ - solidity
+ - distributed-database
+ - key-value-database
+ - distributed-ledger
+ - blockchain-platform
+ - utxo
+ enabled_merge_buttons:
+ squash: true
+ merge: false
+ rebase: false
+ protected_branches:
+ master:
+
+notifications:
+ commits: commits@resilientdb.apache.org
+ issues: commits@resilientdb.apache.org
+ pullrequests: commits@resilientdb.apache.org
diff --git a/.bazelrc b/.bazelrc
new file mode 100644
index 00000000..0566a7c9
--- /dev/null
+++ b/.bazelrc
@@ -0,0 +1,4 @@
+build --cxxopt='-std=c++17' --copt=-O3 --jobs=40
+#build --action_env=PYTHON_BIN_PATH="/usr/bin/python3.10"
+#build --action_env=PYTHON_LIB_PATH="/usr/include/python3.10"
+
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..f2dd0de3
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,168 @@
+---
+Language: Cpp
+# BasedOnStyle: Google
+AccessModifierOffset: -1
+AlignAfterOpenBracket: Align
+AlignConsecutiveMacros: false
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlines: Left
+AlignOperands: true
+AlignTrailingComments: true
+AllowAllArgumentsOnNextLine: true
+AllowAllConstructorInitializersOnNextLine: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: Never
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: All
+AllowShortLambdasOnASingleLine: All
+AllowShortIfStatementsOnASingleLine: WithoutElse
+AllowShortLoopsOnASingleLine: true
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: true
+AlwaysBreakTemplateDeclarations: Yes
+BinPackArguments: true
+BinPackParameters: true
+BraceWrapping:
+ AfterCaseLabel: false
+ AfterClass: false
+ AfterControlStatement: false
+ AfterEnum: false
+ AfterFunction: false
+ AfterNamespace: false
+ AfterObjCDeclaration: false
+ AfterStruct: false
+ AfterUnion: false
+ AfterExternBlock: false
+ BeforeCatch: false
+ BeforeElse: false
+ IndentBraces: false
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Attach
+BreakBeforeInheritanceComma: false
+BreakInheritanceList: BeforeColon
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializersBeforeComma: false
+BreakConstructorInitializers: BeforeColon
+BreakAfterJavaFieldAnnotations: false
+BreakStringLiterals: true
+ColumnLimit: 80
+CommentPragmas: '^ IWYU pragma:'
+CompactNamespaces: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DeriveLineEnding: true
+DerivePointerAlignment: true
+DisableFormat: false
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: true
+ForEachMacros:
+ - foreach
+ - Q_FOREACH
+ - BOOST_FOREACH
+IncludeBlocks: Regroup
+IncludeCategories:
+ - Regex: '^<ext/.*\.h>'
+ Priority: 2
+ SortPriority: 0
+ - Regex: '^<.*\.h>'
+ Priority: 1
+ SortPriority: 0
+ - Regex: '^<.*'
+ Priority: 2
+ SortPriority: 0
+ - Regex: '.*'
+ Priority: 3
+ SortPriority: 0
+IncludeIsMainRegex: '([-_](test|unittest))?$'
+IncludeIsMainSourceRegex: ''
+IndentCaseLabels: true
+IndentGotoLabels: true
+IndentPPDirectives: None
+IndentWidth: 2
+IndentWrappedFunctionNames: false
+JavaScriptQuotes: Leave
+JavaScriptWrapImports: true
+KeepEmptyLinesAtTheStartOfBlocks: false
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBinPackProtocolList: Never
+ObjCBlockIndentWidth: 2
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakAssignment: 2
+PenaltyBreakBeforeFirstCallParameter: 1
+PenaltyBreakComment: 300
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 200
+PointerAlignment: Left
+RawStringFormats:
+ - Language: Cpp
+ Delimiters:
+ - cc
+ - CC
+ - cpp
+ - Cpp
+ - CPP
+ - 'c++'
+ - 'C++'
+ CanonicalDelimiter: ''
+ BasedOnStyle: google
+ - Language: TextProto
+ Delimiters:
+ - pb
+ - PB
+ - proto
+ - PROTO
+ EnclosingFunctions:
+ - EqualsProto
+ - EquivToProto
+ - PARSE_PARTIAL_TEXT_PROTO
+ - PARSE_TEST_PROTO
+ - PARSE_TEXT_PROTO
+ - ParseTextOrDie
+ - ParseTextProtoOrDie
+ CanonicalDelimiter: ''
+ BasedOnStyle: google
+ReflowComments: true
+SortIncludes: true
+SortUsingDeclarations: true
+SpaceAfterCStyleCast: false
+SpaceAfterLogicalNot: false
+SpaceAfterTemplateKeyword: true
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCpp11BracedList: false
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
+SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: true
+SpaceInEmptyBlock: false
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 2
+SpacesInAngles: false
+SpacesInConditionalStatement: false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+SpaceBeforeSquareBrackets: false
+Standard: Auto
+StatementMacros:
+ - Q_UNUSED
+ - QT_REQUIRE_VERSION
+TabWidth: 8
+UseCRLF: false
+UseTab: Never
+...
+
diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml
new file mode 100644
index 00000000..e69de29b
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..618e908f
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,26 @@
+name: bazel-build CI
+
+on:
+ push:
+ branches:
+ - master
+
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ ubuntu-build:
+ name: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+
+ - name: Mount bazel cache
+ uses: actions/cache@v3
+ with:
+ path: "/home/runner/.cache/bazel"
+ key: bazel
+
+ - name: build
+ run: bazel build ...
diff --git a/.github/workflows/loc.yml b/.github/workflows/loc.yml
new file mode 100644
index 00000000..32f33140
--- /dev/null
+++ b/.github/workflows/loc.yml
@@ -0,0 +1,37 @@
+name: LOC
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ repository: ${{github.repository}}
+ ref: ${{ env.BRANCH_NAME }}
+
+ - name: Launch the local action
+ uses: ./ # Uses an action in the root directory
+ id: badge
+ with:
+ debug: true
+ directory: ./
+ patterns: '**/*.h|**/*.cpp'
+ badge: ./output/badge.svg
+ ignore: 'node_modules/|README'
+
+ - name: Deploy to image-data branch
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ publish_dir: ./output
+ publish_branch: image-data
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ user_name: 'github-actions[bot]'
+ user_email: 'github-actions[bot]@users.noreply.github.com'
+
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..6688d39d
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,28 @@
+name: Doxygen Action
+
+on:
+ push:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Doxygen Action
+ uses: mattnotmitt/doxygen-action@v1.1.0
+ with:
+ # Path to Doxyfile
+ doxyfile-path: "Doxyfile" # default is ./Doxyfile
+ # Working directory
+ working-directory: "documents/doxygen/" # default is .
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: documents/doxygen/html
+ cname: api.resilientdb.com
+
diff --git a/.github/workflows/ut.yml b/.github/workflows/ut.yml
new file mode 100644
index 00000000..86aa8573
--- /dev/null
+++ b/.github/workflows/ut.yml
@@ -0,0 +1,24 @@
+name: Unite Test
+
+on:
+ push:
+ branches:
+ - master
+
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ ubuntu-build:
+ name: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Mount bazel cache
+ uses: actions/cache@v3
+ with:
+ path: "/home/runner/.cache/bazel"
+ key: bazel
+ - name: build
+ run: bazel test ...
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..d6dc6e11
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+deps/*/
+scripts/deploy/config/key.conf
+scripts/deploy/config_out/
+deploy/kv_server/output/
+.idea/
+.vscode/
+.DS_Store
+bazel-*
+*.log
+*.bak
+venv
+sdk_validator/venv
+__pycache__
+scripts/deploy/result_*_log
\ No newline at end of file
diff --git a/BUILD.bazel b/BUILD.bazel
new file mode 100644
index 00000000..ef108781
--- /dev/null
+++ b/BUILD.bazel
@@ -0,0 +1,16 @@
+package(default_visibility = ["//visibility:public"])
+
+load("@rules_foreign_cc//foreign_cc:defs.bzl", "make")
+
+make(
+ name = "cryptopp",
+ lib_source = "@cryptopp//:all_srcs",
+ out_static_libs = ["libcryptopp.a"],
+)
+
+cc_library(
+ name = "cryptopp_lib",
+ deps = [
+ ":cryptopp",
+ ],
+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..e69de29b
diff --git a/CNAME b/CNAME
new file mode 100644
index 00000000..f53fa6a9
--- /dev/null
+++ b/CNAME
@@ -0,0 +1 @@
+api.resilientdb.com
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..3c938500
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at support@resilientdb.com. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see
+https://www.contributor-covenant.org/faq
diff --git a/Docker/Dockerfile b/Docker/Dockerfile
new file mode 100644
index 00000000..31571586
--- /dev/null
+++ b/Docker/Dockerfile
@@ -0,0 +1,37 @@
+FROM ubuntu:20.04
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+# Update package lists and install required dependencies
+RUN apt-get update && apt-get install -y \
+ apt-transport-https \
+ curl \
+ gnupg \
+ protobuf-compiler \
+ rapidjson-dev \
+ build-essential \
+ openjdk-11-jdk \
+ zip \
+ unzip \
+ clang-format
+
+# Install Bazel
+RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg \
+ && mv bazel.gpg /etc/apt/trusted.gpg.d/ \
+ && echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
+ && curl https://bazel.build/bazel-release.pub.gpg | apt-key add - \
+ && apt-get update && apt-get install -y bazel=5.0.0 \
+ && rm /etc/apt/sources.list.d/bazel.list
+
+# Set the working directory
+WORKDIR /app
+
+# Copy your project files to the container
+COPY . /app
+
+# Build the project with Bazel
+RUN bazel --version
+RUN bazel build @com_github_bazelbuild_buildtools//buildifier:buildifier
+RUN bazel build service/tools/kv/api_tools/kv_service_tools
+
+ENTRYPOINT ["./entrypoint.sh"]
\ No newline at end of file
diff --git a/Docker/Dockerfile_mac b/Docker/Dockerfile_mac
new file mode 100644
index 00000000..211976d8
--- /dev/null
+++ b/Docker/Dockerfile_mac
@@ -0,0 +1,34 @@
+# Use a base image for ARM64 architecture
+FROM arm64v8/ubuntu:20.04
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+# Update package lists and install required dependencies
+RUN apt-get update && apt-get install -y \
+ apt-transport-https \
+ curl \
+ gnupg \
+ protobuf-compiler \
+ rapidjson-dev \
+ build-essential \
+ openjdk-11-jdk \
+ zip \
+ unzip \
+ clang-format
+
+# Install Bazelisk
+RUN curl -Lo /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-arm64 \
+ && chmod +x /usr/local/bin/bazel
+
+# Set the working directory
+WORKDIR /app
+
+# Copy your project files to the container
+COPY . /app
+
+# Build the project with Bazel
+RUN bazel --version
+RUN bazel build @com_github_bazelbuild_buildtools//buildifier:buildifier
+RUN bazel build service/tools/kv/api_tools/kv_service_tools
+
+ENTRYPOINT ["./entrypoint.sh"]
diff --git a/INSTALL.sh b/INSTALL.sh
new file mode 100755
index 00000000..bd3aa9f0
--- /dev/null
+++ b/INSTALL.sh
@@ -0,0 +1,44 @@
+sudo apt update
+sudo apt install apt-transport-https curl gnupg -y
+sudo apt-get install protobuf-compiler -y
+sudo apt-get install rapidjson-dev -y
+
+curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
+sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
+echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
+curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
+sudo apt update && sudo apt install bazel=6.3.2 -y
+sudo apt install clang-format -y
+rm $PWD/.git/hooks/pre-push
+ln -s $PWD/hooks/pre-push $PWD/.git/hooks/pre-push
+
+bazel --version
+ret=$?
+
+if [[ $ret != "0" ]]; then
+
+sudo apt-get install build-essential openjdk-11-jdk zip unzip -y
+rm bazel-6.0.0-dist.zip
+rm -rf bazel_build
+wget wget https://releases.bazel.build/6.0.0/release/bazel-6.0.0-dist.zip
+mkdir -p bazel_build
+mv bazel-6.0.0-dist.zip bazel_build/
+cd bazel_build
+
+unzip bazel-6.0.0-dist.zip
+
+export JAVA_HOME='/usr/lib/jvm/java-1.11.0-openjdk-arm64/'
+env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
+sudo cp output/bazel /usr/local/bin/
+cd ..
+rm -rf bazel_build
+
+fi
+
+# install buildifier
+bazel build @com_github_bazelbuild_buildtools//buildifier:buildifier
+
+sudo apt-get install python3.10-dev -y
+sudo apt-get install python3-dev -y
+
+sudo apt-get install -y libsqlite3-dev
diff --git a/INSTALL_MAC.sh b/INSTALL_MAC.sh
new file mode 100644
index 00000000..b6d8b76d
--- /dev/null
+++ b/INSTALL_MAC.sh
@@ -0,0 +1,21 @@
+!/bin/sh
+
+sudo apt update
+sudo apt install g++ -y
+sudo apt install apt-transport-https curl gnupg -y
+sudo apt install protobuf-compiler -y
+
+wget https://github.com/bazelbuild/bazelisk/releases/download/v1.8.1/bazelisk-linux-arm64
+chmod +x bazelisk-linux-arm64
+sudo mv bazelisk-linux-arm64 /usr/local/bin/bazel
+
+sudo apt install clang-format -y
+rm -rf $PWD/.git/hooks/pre-push
+ln -s $PWD/hooks/pre-push $PWD/.git/hooks/pre-push
+
+bazel build @com_github_bazelbuild_buildtools//buildifier:buildifier
+
+# for jemalloc
+sudo apt-get install autoconf automake libtool -y
+
+sudo apt install rapidjson-dev -y
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/MODULE.bazel b/MODULE.bazel
new file mode 100644
index 00000000..00bb1836
--- /dev/null
+++ b/MODULE.bazel
@@ -0,0 +1,6 @@
+###############################################################################
+# Bazel now uses Bzlmod by default to manage external dependencies.
+# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
+#
+# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
+###############################################################################
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
new file mode 100644
index 00000000..11bf37a4
--- /dev/null
+++ b/MODULE.bazel.lock
@@ -0,0 +1,1632 @@
+{
+ "lockFileVersion": 6,
+ "moduleFileHash": "0e3e315145ac7ee7a4e0ac825e1c5e03c068ec1254dd42c3caaecb27e921dc4d",
+ "flags": {
+ "cmdRegistries": [
+ "https://bcr.bazel.build/"
+ ],
+ "cmdModuleOverrides": {},
+ "allowedYankedVersions": [],
+ "envVarAllowedYankedVersions": "",
+ "ignoreDevDependency": false,
+ "directDependenciesMode": "WARNING",
+ "compatibilityMode": "ERROR"
+ },
+ "localOverrideHashes": {
+ "bazel_tools": "1ae69322ac3823527337acf02016e8ee95813d8d356f47060255b8956fa642f0"
+ },
+ "moduleDepGraph": {
+ "<root>": {
+ "name": "",
+ "version": "",
+ "key": "<root>",
+ "repoName": "",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ }
+ },
+ "bazel_tools@_": {
+ "name": "bazel_tools",
+ "version": "",
+ "key": "bazel_tools@_",
+ "repoName": "bazel_tools",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@local_config_cc_toolchains//:all",
+ "@local_config_sh//:local_sh_toolchain"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl",
+ "extensionName": "cc_configure_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 18,
+ "column": 29
+ },
+ "imports": {
+ "local_config_cc": "local_config_cc",
+ "local_config_cc_toolchains": "local_config_cc_toolchains"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/osx:xcode_configure.bzl",
+ "extensionName": "xcode_configure_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 22,
+ "column": 32
+ },
+ "imports": {
+ "local_config_xcode": "local_config_xcode"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@rules_java//java:extensions.bzl",
+ "extensionName": "toolchains",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 25,
+ "column": 32
+ },
+ "imports": {
+ "local_jdk": "local_jdk",
+ "remote_java_tools": "remote_java_tools",
+ "remote_java_tools_linux": "remote_java_tools_linux",
+ "remote_java_tools_windows": "remote_java_tools_windows",
+ "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64",
+ "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/sh:sh_configure.bzl",
+ "extensionName": "sh_configure_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 36,
+ "column": 39
+ },
+ "imports": {
+ "local_config_sh": "local_config_sh"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/test:extensions.bzl",
+ "extensionName": "remote_coverage_tools_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 40,
+ "column": 48
+ },
+ "imports": {
+ "remote_coverage_tools": "remote_coverage_tools"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/android:android_extensions.bzl",
+ "extensionName": "remote_android_tools_extensions",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 43,
+ "column": 42
+ },
+ "imports": {
+ "android_gmaven_r8": "android_gmaven_r8",
+ "android_tools": "android_tools"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@buildozer//:buildozer_binary.bzl",
+ "extensionName": "buildozer_binary",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 47,
+ "column": 33
+ },
+ "imports": {
+ "buildozer_binary": "buildozer_binary"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "rules_cc": "rules_cc@0.0.9",
+ "rules_java": "rules_java@7.4.0",
+ "rules_license": "rules_license@0.0.7",
+ "rules_proto": "rules_proto@5.3.0-21.7",
+ "rules_python": "rules_python@0.22.1",
+ "buildozer": "buildozer@6.4.0.2",
+ "platforms": "platforms@0.0.7",
+ "com_google_protobuf": "protobuf@21.7",
+ "zlib": "zlib@1.3",
+ "build_bazel_apple_support": "apple_support@1.5.0",
+ "local_config_platform": "local_config_platform@_"
+ }
+ },
+ "local_config_platform@_": {
+ "name": "local_config_platform",
+ "version": "",
+ "key": "local_config_platform@_",
+ "repoName": "local_config_platform",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "platforms": "platforms@0.0.7",
+ "bazel_tools": "bazel_tools@_"
+ }
+ },
+ "rules_cc@0.0.9": {
+ "name": "rules_cc",
+ "version": "0.0.9",
+ "key": "rules_cc@0.0.9",
+ "repoName": "rules_cc",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@local_config_cc_toolchains//:all"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl",
+ "extensionName": "cc_configure_extension",
+ "usingModule": "rules_cc@0.0.9",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel",
+ "line": 9,
+ "column": 29
+ },
+ "imports": {
+ "local_config_cc_toolchains": "local_config_cc_toolchains"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "platforms": "platforms@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"
+ ],
+ "integrity": "sha256-IDeHW5pEVtzkp50RKorohbvEqtlo5lh9ym5k86CQDN8=",
+ "strip_prefix": "rules_cc-0.0.9",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/rules_cc/0.0.9/patches/module_dot_bazel_version.patch": "sha256-mM+qzOI0SgAdaJBlWOSMwMPKpaA9b7R37Hj/tp5bb4g="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_java@7.4.0": {
+ "name": "rules_java",
+ "version": "7.4.0",
+ "key": "rules_java@7.4.0",
+ "repoName": "rules_java",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "//toolchains:all",
+ "@local_jdk//:runtime_toolchain_definition",
+ "@local_jdk//:bootstrap_runtime_toolchain_definition",
+ "@remotejdk11_linux_toolchain_config_repo//:all",
+ "@remotejdk11_linux_aarch64_toolchain_config_repo//:all",
+ "@remotejdk11_linux_ppc64le_toolchain_config_repo//:all",
+ "@remotejdk11_linux_s390x_toolchain_config_repo//:all",
+ "@remotejdk11_macos_toolchain_config_repo//:all",
+ "@remotejdk11_macos_aarch64_toolchain_config_repo//:all",
+ "@remotejdk11_win_toolchain_config_repo//:all",
+ "@remotejdk11_win_arm64_toolchain_config_repo//:all",
+ "@remotejdk17_linux_toolchain_config_repo//:all",
+ "@remotejdk17_linux_aarch64_toolchain_config_repo//:all",
+ "@remotejdk17_linux_ppc64le_toolchain_config_repo//:all",
+ "@remotejdk17_linux_s390x_toolchain_config_repo//:all",
+ "@remotejdk17_macos_toolchain_config_repo//:all",
+ "@remotejdk17_macos_aarch64_toolchain_config_repo//:all",
+ "@remotejdk17_win_toolchain_config_repo//:all",
+ "@remotejdk17_win_arm64_toolchain_config_repo//:all",
+ "@remotejdk21_linux_toolchain_config_repo//:all",
+ "@remotejdk21_linux_aarch64_toolchain_config_repo//:all",
+ "@remotejdk21_macos_toolchain_config_repo//:all",
+ "@remotejdk21_macos_aarch64_toolchain_config_repo//:all",
+ "@remotejdk21_win_toolchain_config_repo//:all"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_java//java:extensions.bzl",
+ "extensionName": "toolchains",
+ "usingModule": "rules_java@7.4.0",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_java/7.4.0/MODULE.bazel",
+ "line": 19,
+ "column": 27
+ },
+ "imports": {
+ "remote_java_tools": "remote_java_tools",
+ "remote_java_tools_linux": "remote_java_tools_linux",
+ "remote_java_tools_windows": "remote_java_tools_windows",
+ "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64",
+ "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64",
+ "local_jdk": "local_jdk",
+ "remotejdk11_linux_toolchain_config_repo": "remotejdk11_linux_toolchain_config_repo",
+ "remotejdk11_linux_aarch64_toolchain_config_repo": "remotejdk11_linux_aarch64_toolchain_config_repo",
+ "remotejdk11_linux_ppc64le_toolchain_config_repo": "remotejdk11_linux_ppc64le_toolchain_config_repo",
+ "remotejdk11_linux_s390x_toolchain_config_repo": "remotejdk11_linux_s390x_toolchain_config_repo",
+ "remotejdk11_macos_toolchain_config_repo": "remotejdk11_macos_toolchain_config_repo",
+ "remotejdk11_macos_aarch64_toolchain_config_repo": "remotejdk11_macos_aarch64_toolchain_config_repo",
+ "remotejdk11_win_toolchain_config_repo": "remotejdk11_win_toolchain_config_repo",
+ "remotejdk11_win_arm64_toolchain_config_repo": "remotejdk11_win_arm64_toolchain_config_repo",
+ "remotejdk17_linux_toolchain_config_repo": "remotejdk17_linux_toolchain_config_repo",
+ "remotejdk17_linux_aarch64_toolchain_config_repo": "remotejdk17_linux_aarch64_toolchain_config_repo",
+ "remotejdk17_linux_ppc64le_toolchain_config_repo": "remotejdk17_linux_ppc64le_toolchain_config_repo",
+ "remotejdk17_linux_s390x_toolchain_config_repo": "remotejdk17_linux_s390x_toolchain_config_repo",
+ "remotejdk17_macos_toolchain_config_repo": "remotejdk17_macos_toolchain_config_repo",
+ "remotejdk17_macos_aarch64_toolchain_config_repo": "remotejdk17_macos_aarch64_toolchain_config_repo",
+ "remotejdk17_win_toolchain_config_repo": "remotejdk17_win_toolchain_config_repo",
+ "remotejdk17_win_arm64_toolchain_config_repo": "remotejdk17_win_arm64_toolchain_config_repo",
+ "remotejdk21_linux_toolchain_config_repo": "remotejdk21_linux_toolchain_config_repo",
+ "remotejdk21_linux_aarch64_toolchain_config_repo": "remotejdk21_linux_aarch64_toolchain_config_repo",
+ "remotejdk21_macos_toolchain_config_repo": "remotejdk21_macos_toolchain_config_repo",
+ "remotejdk21_macos_aarch64_toolchain_config_repo": "remotejdk21_macos_aarch64_toolchain_config_repo",
+ "remotejdk21_win_toolchain_config_repo": "remotejdk21_win_toolchain_config_repo"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "platforms": "platforms@0.0.7",
+ "rules_cc": "rules_cc@0.0.9",
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_proto": "rules_proto@5.3.0-21.7",
+ "rules_license": "rules_license@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/rules_java/releases/download/7.4.0/rules_java-7.4.0.tar.gz"
+ ],
+ "integrity": "sha256-l27wi0nJKXQfIBeQ5Z44B8cq2B9CjIvJU82+/1/tFes=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_license@0.0.7": {
+ "name": "rules_license",
+ "version": "0.0.7",
+ "key": "rules_license@0.0.7",
+ "repoName": "rules_license",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz"
+ ],
+ "integrity": "sha256-RTHezLkTY5ww5cdRKgVNXYdWmNrrddjPkPKEN1/nw2A=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_proto@5.3.0-21.7": {
+ "name": "rules_proto",
+ "version": "5.3.0-21.7",
+ "key": "rules_proto@5.3.0-21.7",
+ "repoName": "rules_proto",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "com_google_protobuf": "protobuf@21.7",
+ "rules_cc": "rules_cc@0.0.9",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz"
+ ],
+ "integrity": "sha256-3D+yBqLLNEG0heseQjFlsjEjWh6psDG0Qzz3vB+kYN0=",
+ "strip_prefix": "rules_proto-5.3.0-21.7",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_python@0.22.1": {
+ "name": "rules_python",
+ "version": "0.22.1",
+ "key": "rules_python@0.22.1",
+ "repoName": "rules_python",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@bazel_tools//tools/python:autodetecting_toolchain"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_python//python/extensions/private:internal_deps.bzl",
+ "extensionName": "internal_deps",
+ "usingModule": "rules_python@0.22.1",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel",
+ "line": 14,
+ "column": 30
+ },
+ "imports": {
+ "pypi__build": "pypi__build",
+ "pypi__click": "pypi__click",
+ "pypi__colorama": "pypi__colorama",
+ "pypi__importlib_metadata": "pypi__importlib_metadata",
+ "pypi__installer": "pypi__installer",
+ "pypi__more_itertools": "pypi__more_itertools",
+ "pypi__packaging": "pypi__packaging",
+ "pypi__pep517": "pypi__pep517",
+ "pypi__pip": "pypi__pip",
+ "pypi__pip_tools": "pypi__pip_tools",
+ "pypi__setuptools": "pypi__setuptools",
+ "pypi__tomli": "pypi__tomli",
+ "pypi__wheel": "pypi__wheel",
+ "pypi__zipp": "pypi__zipp",
+ "pypi__coverage_cp310_aarch64-apple-darwin": "pypi__coverage_cp310_aarch64-apple-darwin",
+ "pypi__coverage_cp310_aarch64-unknown-linux-gnu": "pypi__coverage_cp310_aarch64-unknown-linux-gnu",
+ "pypi__coverage_cp310_x86_64-apple-darwin": "pypi__coverage_cp310_x86_64-apple-darwin",
+ "pypi__coverage_cp310_x86_64-unknown-linux-gnu": "pypi__coverage_cp310_x86_64-unknown-linux-gnu",
+ "pypi__coverage_cp311_aarch64-unknown-linux-gnu": "pypi__coverage_cp311_aarch64-unknown-linux-gnu",
+ "pypi__coverage_cp311_x86_64-apple-darwin": "pypi__coverage_cp311_x86_64-apple-darwin",
+ "pypi__coverage_cp311_x86_64-unknown-linux-gnu": "pypi__coverage_cp311_x86_64-unknown-linux-gnu",
+ "pypi__coverage_cp38_aarch64-apple-darwin": "pypi__coverage_cp38_aarch64-apple-darwin",
+ "pypi__coverage_cp38_aarch64-unknown-linux-gnu": "pypi__coverage_cp38_aarch64-unknown-linux-gnu",
+ "pypi__coverage_cp38_x86_64-apple-darwin": "pypi__coverage_cp38_x86_64-apple-darwin",
+ "pypi__coverage_cp38_x86_64-unknown-linux-gnu": "pypi__coverage_cp38_x86_64-unknown-linux-gnu",
+ "pypi__coverage_cp39_aarch64-apple-darwin": "pypi__coverage_cp39_aarch64-apple-darwin",
+ "pypi__coverage_cp39_aarch64-unknown-linux-gnu": "pypi__coverage_cp39_aarch64-unknown-linux-gnu",
+ "pypi__coverage_cp39_x86_64-apple-darwin": "pypi__coverage_cp39_x86_64-apple-darwin",
+ "pypi__coverage_cp39_x86_64-unknown-linux-gnu": "pypi__coverage_cp39_x86_64-unknown-linux-gnu"
+ },
+ "devImports": [],
+ "tags": [
+ {
+ "tagName": "install",
+ "attributeValues": {},
+ "devDependency": false,
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel",
+ "line": 15,
+ "column": 22
+ }
+ }
+ ],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@rules_python//python/extensions:python.bzl",
+ "extensionName": "python",
+ "usingModule": "rules_python@0.22.1",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel",
+ "line": 50,
+ "column": 23
+ },
+ "imports": {
+ "pythons_hub": "pythons_hub"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "platforms": "platforms@0.0.7",
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_proto": "rules_proto@5.3.0-21.7",
+ "com_google_protobuf": "protobuf@21.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/rules_python/releases/download/0.22.1/rules_python-0.22.1.tar.gz"
+ ],
+ "integrity": "sha256-pWQP3dS+sD6MH95e1xYMC6a9R359BIZhwwwGk2om/WM=",
+ "strip_prefix": "rules_python-0.22.1",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/rules_python/0.22.1/patches/module_dot_bazel_version.patch": "sha256-3+VLDH9gYDzNI4eOW7mABC/LKxh1xqF6NhacLbNTucs="
+ },
+ "remote_patch_strip": 1
+ }
+ }
+ },
+ "buildozer@6.4.0.2": {
+ "name": "buildozer",
+ "version": "6.4.0.2",
+ "key": "buildozer@6.4.0.2",
+ "repoName": "buildozer",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@buildozer//:buildozer_binary.bzl",
+ "extensionName": "buildozer_binary",
+ "usingModule": "buildozer@6.4.0.2",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/buildozer/6.4.0.2/MODULE.bazel",
+ "line": 7,
+ "column": 33
+ },
+ "imports": {
+ "buildozer_binary": "buildozer_binary"
+ },
+ "devImports": [],
+ "tags": [
+ {
+ "tagName": "buildozer",
+ "attributeValues": {
+ "sha256": {
+ "darwin-amd64": "d29e347ecd6b5673d72cb1a8de05bf1b06178dd229ff5eb67fad5100c840cc8e",
+ "darwin-arm64": "9b9e71bdbec5e7223871e913b65d12f6d8fa026684daf991f00e52ed36a6978d",
+ "linux-amd64": "8dfd6345da4e9042daa738d7fdf34f699c5dfce4632f7207956fceedd8494119",
+ "linux-arm64": "6559558fded658c8fa7432a9d011f7c4dcbac6b738feae73d2d5c352e5f605fa",
+ "windows-amd64": "e7f05bf847f7c3689dd28926460ce6e1097ae97380ac8e6ae7147b7b706ba19b"
+ },
+ "version": "6.4.0"
+ },
+ "devDependency": false,
+ "location": {
+ "file": "https://bcr.bazel.build/modules/buildozer/6.4.0.2/MODULE.bazel",
+ "line": 8,
+ "column": 27
+ }
+ }
+ ],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/fmeum/buildozer/releases/download/v6.4.0.2/buildozer-v6.4.0.2.tar.gz"
+ ],
+ "integrity": "sha256-k7tFKQMR2AygxpmZfH0yEPnQmF3efFgD9rBPkj+Yz/8=",
+ "strip_prefix": "buildozer-6.4.0.2",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/buildozer/6.4.0.2/patches/module_dot_bazel_version.patch": "sha256-gKANF2HMilj7bWmuXs4lbBIAAansuWC4IhWGB/CerjU="
+ },
+ "remote_patch_strip": 1
+ }
+ }
+ },
+ "platforms@0.0.7": {
+ "name": "platforms",
+ "version": "0.0.7",
+ "key": "platforms@0.0.7",
+ "repoName": "platforms",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "rules_license": "rules_license@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz"
+ ],
+ "integrity": "sha256-OlYcmee9vpFzqmU/1Xn+hJ8djWc5V4CrR3Cx84FDHVE=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "protobuf@21.7": {
+ "name": "protobuf",
+ "version": "21.7",
+ "key": "protobuf@21.7",
+ "repoName": "protobuf",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_jvm_external//:extensions.bzl",
+ "extensionName": "maven",
+ "usingModule": "protobuf@21.7",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel",
+ "line": 22,
+ "column": 22
+ },
+ "imports": {
+ "maven": "maven"
+ },
+ "devImports": [],
+ "tags": [
+ {
+ "tagName": "install",
+ "attributeValues": {
+ "name": "maven",
+ "artifacts": [
+ "com.google.code.findbugs:jsr305:3.0.2",
+ "com.google.code.gson:gson:2.8.9",
+ "com.google.errorprone:error_prone_annotations:2.3.2",
+ "com.google.j2objc:j2objc-annotations:1.3",
+ "com.google.guava:guava:31.1-jre",
+ "com.google.guava:guava-testlib:31.1-jre",
+ "com.google.truth:truth:1.1.2",
+ "junit:junit:4.13.2",
+ "org.mockito:mockito-core:4.3.1"
+ ]
+ },
+ "devDependency": false,
+ "location": {
+ "file": "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel",
+ "line": 24,
+ "column": 14
+ }
+ }
+ ],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_python": "rules_python@0.22.1",
+ "rules_cc": "rules_cc@0.0.9",
+ "rules_proto": "rules_proto@5.3.0-21.7",
+ "rules_java": "rules_java@7.4.0",
+ "rules_pkg": "rules_pkg@0.7.0",
+ "com_google_abseil": "abseil-cpp@20211102.0",
+ "zlib": "zlib@1.3",
+ "upb": "upb@0.0.0-20220923-a547704",
+ "rules_jvm_external": "rules_jvm_external@4.4.2",
+ "com_google_googletest": "googletest@1.11.0",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/protocolbuffers/protobuf/releases/download/v21.7/protobuf-all-21.7.zip"
+ ],
+ "integrity": "sha256-VJOiH17T/FAuZv7GuUScBqVRztYwAvpIkDxA36jeeko=",
+ "strip_prefix": "protobuf-21.7",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_module_dot_bazel.patch": "sha256-q3V2+eq0v2XF0z8z+V+QF4cynD6JvHI1y3kI/+rzl5s=",
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_module_dot_bazel_for_examples.patch": "sha256-O7YP6s3lo/1opUiO0jqXYORNHdZ/2q3hjz1QGy8QdIU=",
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/relative_repo_names.patch": "sha256-RK9RjW8T5UJNG7flIrnFiNE9vKwWB+8uWWtJqXYT0w4=",
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_missing_files.patch": "sha256-Hyne4DG2u5bXcWHNxNMirA2QFAe/2Cl8oMm1XJdkQIY="
+ },
+ "remote_patch_strip": 1
+ }
+ }
+ },
+ "zlib@1.3": {
+ "name": "zlib",
+ "version": "1.3",
+ "key": "zlib@1.3",
+ "repoName": "zlib",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "platforms": "platforms@0.0.7",
+ "rules_cc": "rules_cc@0.0.9",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz"
+ ],
+ "integrity": "sha256-/wukwpIBPbwnUws6geH5qBPNOd4Byl4Pi/NVcC76WT4=",
+ "strip_prefix": "zlib-1.3",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/zlib/1.3/patches/add_build_file.patch": "sha256-Ei+FYaaOo7A3jTKunMEodTI0Uw5NXQyZEcboMC8JskY=",
+ "https://bcr.bazel.build/modules/zlib/1.3/patches/module_dot_bazel.patch": "sha256-fPWLM+2xaF/kuy+kZc1YTfW6hNjrkG400Ho7gckuyJk="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "apple_support@1.5.0": {
+ "name": "apple_support",
+ "version": "1.5.0",
+ "key": "apple_support@1.5.0",
+ "repoName": "build_bazel_apple_support",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@local_config_apple_cc_toolchains//:all"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@build_bazel_apple_support//crosstool:setup.bzl",
+ "extensionName": "apple_cc_configure_extension",
+ "usingModule": "apple_support@1.5.0",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel",
+ "line": 17,
+ "column": 35
+ },
+ "imports": {
+ "local_config_apple_cc": "local_config_apple_cc",
+ "local_config_apple_cc_toolchains": "local_config_apple_cc_toolchains"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "platforms": "platforms@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/apple_support/releases/download/1.5.0/apple_support.1.5.0.tar.gz"
+ ],
+ "integrity": "sha256-miM41vja0yRPgj8txghKA+TQ+7J8qJLclw5okNW0gYQ=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "bazel_skylib@1.3.0": {
+ "name": "bazel_skylib",
+ "version": "1.3.0",
+ "key": "bazel_skylib@1.3.0",
+ "repoName": "bazel_skylib",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "//toolchains/unittest:cmd_toolchain",
+ "//toolchains/unittest:bash_toolchain"
+ ],
+ "extensionUsages": [],
+ "deps": {
+ "platforms": "platforms@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz"
+ ],
+ "integrity": "sha256-dNVE2W9KW7Yw1GXKi7z+Ix41lOWq5X4e2/F6brPKJQY=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_pkg@0.7.0": {
+ "name": "rules_pkg",
+ "version": "0.7.0",
+ "key": "rules_pkg@0.7.0",
+ "repoName": "rules_pkg",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "rules_python": "rules_python@0.22.1",
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_license": "rules_license@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz"
+ ],
+ "integrity": "sha256-iimOgydi7aGDBZfWT+fbWBeKqEzVkm121bdE1lWJQcI=",
+ "strip_prefix": "",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/rules_pkg/0.7.0/patches/module_dot_bazel.patch": "sha256-4OaEPZwYF6iC71ZTDg6MJ7LLqX7ZA0/kK4mT+4xKqiE="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "abseil-cpp@20211102.0": {
+ "name": "abseil-cpp",
+ "version": "20211102.0",
+ "key": "abseil-cpp@20211102.0",
+ "repoName": "abseil-cpp",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "rules_cc": "rules_cc@0.0.9",
+ "platforms": "platforms@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz"
+ ],
+ "integrity": "sha256-3PcbnLqNwMqZQMSzFqDHlr6Pq0KwcLtrfKtitI8OZsQ=",
+ "strip_prefix": "abseil-cpp-20211102.0",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/patches/module_dot_bazel.patch": "sha256-4izqopgGCey4jVZzl/w3M2GVPNohjh2B5TmbThZNvPY="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "upb@0.0.0-20220923-a547704": {
+ "name": "upb",
+ "version": "0.0.0-20220923-a547704",
+ "key": "upb@0.0.0-20220923-a547704",
+ "repoName": "upb",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_proto": "rules_proto@5.3.0-21.7",
+ "com_google_protobuf": "protobuf@21.7",
+ "com_google_absl": "abseil-cpp@20211102.0",
+ "platforms": "platforms@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/protocolbuffers/upb/archive/a5477045acaa34586420942098f5fecd3570f577.tar.gz"
+ ],
+ "integrity": "sha256-z39x6v+QskwaKLSWRan/A6mmwecTQpHOcJActj5zZLU=",
+ "strip_prefix": "upb-a5477045acaa34586420942098f5fecd3570f577",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/patches/module_dot_bazel.patch": "sha256-wH4mNS6ZYy+8uC0HoAft/c7SDsq2Kxf+J8dUakXhaB0="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_jvm_external@4.4.2": {
+ "name": "rules_jvm_external",
+ "version": "4.4.2",
+ "key": "rules_jvm_external@4.4.2",
+ "repoName": "rules_jvm_external",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_jvm_external//:non-module-deps.bzl",
+ "extensionName": "non_module_deps",
+ "usingModule": "rules_jvm_external@4.4.2",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel",
+ "line": 9,
+ "column": 32
+ },
+ "imports": {
+ "io_bazel_rules_kotlin": "io_bazel_rules_kotlin"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@rules_jvm_external//:extensions.bzl",
+ "extensionName": "maven",
+ "usingModule": "rules_jvm_external@4.4.2",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel",
+ "line": 16,
+ "column": 22
+ },
+ "imports": {
+ "rules_jvm_external_deps": "rules_jvm_external_deps"
+ },
+ "devImports": [],
+ "tags": [
+ {
+ "tagName": "install",
+ "attributeValues": {
+ "name": "rules_jvm_external_deps",
+ "artifacts": [
+ "com.google.cloud:google-cloud-core:1.93.10",
+ "com.google.cloud:google-cloud-storage:1.113.4",
+ "com.google.code.gson:gson:2.9.0",
+ "org.apache.maven:maven-artifact:3.8.6",
+ "software.amazon.awssdk:s3:2.17.183"
+ ],
+ "lock_file": "@rules_jvm_external//:rules_jvm_external_deps_install.json"
+ },
+ "devDependency": false,
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel",
+ "line": 18,
+ "column": 14
+ }
+ }
+ ],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "io_bazel_stardoc": "stardoc@0.5.1",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/rules_jvm_external/archive/refs/tags/4.4.2.zip"
+ ],
+ "integrity": "sha256-c1YC9QgT6y6pPKP15DsZWb2AshO4NqB6YqKddXZwt3s=",
+ "strip_prefix": "rules_jvm_external-4.4.2",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "googletest@1.11.0": {
+ "name": "googletest",
+ "version": "1.11.0",
+ "key": "googletest@1.11.0",
+ "repoName": "googletest",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "com_google_absl": "abseil-cpp@20211102.0",
+ "platforms": "platforms@0.0.7",
+ "rules_cc": "rules_cc@0.0.9",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz"
+ ],
+ "integrity": "sha256-tIcL8SH/d5W6INILzdhie44Ijy0dqymaAxwQNO3ck9U=",
+ "strip_prefix": "googletest-release-1.11.0",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/googletest/1.11.0/patches/module_dot_bazel.patch": "sha256-HuahEdI/n8KCI071sN3CEziX+7qP/Ec77IWayYunLP0="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "stardoc@0.5.1": {
+ "name": "stardoc",
+ "version": "0.5.1",
+ "key": "stardoc@0.5.1",
+ "repoName": "stardoc",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_java": "rules_java@7.4.0",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "urls": [
+ "https://github.com/bazelbuild/stardoc/releases/download/0.5.1/stardoc-0.5.1.tar.gz"
+ ],
+ "integrity": "sha256-qoFNrgrEALurLoiB+ZFcb0fElmS/CHxAmhX5BDjSwj4=",
+ "strip_prefix": "",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/stardoc/0.5.1/patches/module_dot_bazel.patch": "sha256-UAULCuTpJE7SG0YrR9XLjMfxMRmbP+za3uW9ONZ5rjI="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ }
+ },
+ "moduleExtensions": {
+ "@@apple_support~//crosstool:setup.bzl%apple_cc_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "pMLFCYaRPkgXPQ8vtuNkMfiHfPmRBy6QJfnid4sWfv0=",
+ "recordedFileInputs": {},
+ "recordedDirentsInputs": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_apple_cc": {
+ "bzlFile": "@@apple_support~//crosstool:setup.bzl",
+ "ruleClassName": "_apple_cc_autoconf",
+ "attributes": {}
+ },
+ "local_config_apple_cc_toolchains": {
+ "bzlFile": "@@apple_support~//crosstool:setup.bzl",
+ "ruleClassName": "_apple_cc_autoconf_toolchains",
+ "attributes": {}
+ }
+ },
+ "recordedRepoMappingEntries": [
+ [
+ "apple_support~",
+ "bazel_tools",
+ "bazel_tools"
+ ]
+ ]
+ }
+ },
+ "@@bazel_tools//tools/cpp:cc_configure.bzl%cc_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "PHpT2yqMGms2U4L3E/aZ+WcQalmZWm+ILdP3yiLsDhA=",
+ "recordedFileInputs": {},
+ "recordedDirentsInputs": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_cc": {
+ "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl",
+ "ruleClassName": "cc_autoconf",
+ "attributes": {}
+ },
+ "local_config_cc_toolchains": {
+ "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl",
+ "ruleClassName": "cc_autoconf_toolchains",
+ "attributes": {}
+ }
+ },
+ "recordedRepoMappingEntries": [
+ [
+ "bazel_tools",
+ "bazel_tools",
+ "bazel_tools"
+ ]
+ ]
+ }
+ },
+ "@@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "Qh2bWTU6QW6wkrd87qrU4YeY+SG37Nvw3A0PR4Y0L2Y=",
+ "recordedFileInputs": {},
+ "recordedDirentsInputs": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_xcode": {
+ "bzlFile": "@@bazel_tools//tools/osx:xcode_configure.bzl",
+ "ruleClassName": "xcode_autoconf",
+ "attributes": {
+ "xcode_locator": "@bazel_tools//tools/osx:xcode_locator.m",
+ "remote_xcode": ""
+ }
+ }
+ },
+ "recordedRepoMappingEntries": []
+ }
+ },
+ "@@bazel_tools//tools/sh:sh_configure.bzl%sh_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "hp4NgmNjEg5+xgvzfh6L83bt9/aiiWETuNpwNuF1MSU=",
+ "recordedFileInputs": {},
+ "recordedDirentsInputs": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_sh": {
+ "bzlFile": "@@bazel_tools//tools/sh:sh_configure.bzl",
+ "ruleClassName": "sh_config",
+ "attributes": {}
+ }
+ },
+ "recordedRepoMappingEntries": []
+ }
+ },
+ "@@rules_java~//java:extensions.bzl%toolchains": {
+ "general": {
+ "bzlTransitiveDigest": "tJHbmWnq7m+9eUBnUdv7jZziQ26FmcGL9C5/hU3Q9UQ=",
+ "recordedFileInputs": {},
+ "recordedDirentsInputs": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "remotejdk21_linux_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_linux_s390x_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_macos_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk21_macos_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_linux_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk21_macos_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "e8260516de8b60661422a725f1df2c36ef888f6fb35393566b00e7325db3d04e",
+ "strip_prefix": "zulu21.32.17-ca-jdk21.0.2-macosx_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_linux_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_macos_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "314b04568ec0ae9b36ba03c9cbd42adc9e1265f74678923b19297d66eb84dcca",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remote_java_tools_windows": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "sha256": "fe2f88169696d6c6fc6e90ba61bb46be7d0ae3693cbafdf336041bf56679e8d1",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.4/java_tools_windows-v13.4.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.4/java_tools_windows-v13.4.zip"
+ ]
+ }
+ },
+ "remotejdk11_win": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "43408193ce2fa0862819495b5ae8541085b95660153f2adcf91a52d3a1710e83",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-win_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip"
+ ]
+ }
+ },
+ "remotejdk11_win_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_linux_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "54174439f2b3fddd11f1048c397fe7bb45d4c9d66d452d6889b013d04d21c4de",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "b9482f2304a1a68a614dfacddcf29569a72f0fac32e6c74f83dc1b9a157b8340",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_linux_s390x_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_linux_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_macos": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "bcaab11cfe586fae7583c6d9d311c64384354fb2638eb9a012eca4c3f1a1d9fd",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_win_arm64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "b8a28e6e767d90acf793ea6f5bed0bb595ba0ba5ebdf8b99f395266161e53ec2",
+ "strip_prefix": "jdk-11.0.13+8",
+ "urls": [
+ "https://mirror.bazel.build/aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-aarch64.zip"
+ ]
+ }
+ },
+ "remotejdk17_macos": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "640453e8afe8ffe0fb4dceb4535fb50db9c283c64665eebb0ba68b19e65f4b1f",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_macos": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "3ad8fe288eb57d975c2786ae453a036aa46e47ab2ac3d81538ebae2a54d3c025",
+ "strip_prefix": "zulu21.32.17-ca-jdk21.0.2-macosx_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-macosx_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_macos_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_macos_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_win": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "192f2afca57701de6ec496234f7e45d971bf623ff66b8ee4a5c81582054e5637",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip"
+ ]
+ }
+ },
+ "remotejdk11_macos_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_linux_ppc64le_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk21_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "5ad730fbee6bb49bfff10bf39e84392e728d89103d3474a7e5def0fd134b300a",
+ "strip_prefix": "zulu21.32.17-ca-jdk21.0.2-linux_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_x64.tar.gz"
+ ]
+ }
+ },
+ "remote_java_tools_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "sha256": "ba10f09a138cf185d04cbc807d67a3da42ab13d618c5d1ce20d776e199c33a39",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.4/java_tools_linux-v13.4.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.4/java_tools_linux-v13.4.zip"
+ ]
+ }
+ },
+ "remotejdk21_win": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "f7cc15ca17295e69c907402dfe8db240db446e75d3b150da7bf67243cded93de",
+ "strip_prefix": "zulu21.32.17-ca-jdk21.0.2-win_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-win_x64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-win_x64.zip"
+ ]
+ }
+ },
+ "remotejdk21_linux_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "ce7df1af5d44a9f455617c4b8891443fbe3e4b269c777d8b82ed66f77167cfe0",
+ "strip_prefix": "zulu21.32.17-ca-jdk21.0.2-linux_aarch64",
+ "urls": [
+ "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz",
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_linux_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_linux_s390x": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "a58fc0361966af0a5d5a31a2d8a208e3c9bb0f54f345596fd80b99ea9a39788b",
+ "strip_prefix": "jdk-11.0.15+10",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz",
+ "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_linux_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "6531cef61e416d5a7b691555c8cf2bdff689201b8a001ff45ab6740062b44313",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_win_arm64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "a34b404f87a08a61148b38e1416d837189e1df7a040d949e743633daf4695a3c",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_macos_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_linux_ppc64le_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk17_win_arm64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "6802c99eae0d788e21f52d03cab2e2b3bf42bc334ca03cbf19f71eb70ee19f85",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip"
+ ]
+ }
+ },
+ "remote_java_tools_darwin_arm64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "sha256": "076a7e198ad077f8c7d997986ef5102427fae6bbfce7a7852d2e080ed8767528",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.4/java_tools_darwin_arm64-v13.4.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.4/java_tools_darwin_arm64-v13.4.zip"
+ ]
+ }
+ },
+ "remotejdk17_linux_ppc64le": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "00a4c07603d0218cd678461b5b3b7e25b3253102da4022d31fc35907f21a2efd",
+ "strip_prefix": "jdk-17.0.8.1+1",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz",
+ "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_linux_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_win_arm64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "local_jdk": {
+ "bzlFile": "@@rules_java~//toolchains:local_java_repository.bzl",
+ "ruleClassName": "_local_java_repository_rule",
+ "attributes": {
+ "java_home": "",
+ "version": "",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ }
+ },
+ "remote_java_tools_darwin_x86_64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "sha256": "4523aec4d09c587091a2dae6f5c9bc6922c220f3b6030e5aba9c8f015913cc65",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.4/java_tools_darwin_x86_64-v13.4.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.4/java_tools_darwin_x86_64-v13.4.zip"
+ ]
+ }
+ },
+ "remote_java_tools": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "sha256": "e025fd260ac39b47c111f5212d64ec0d00d85dec16e49368aae82fc626a940cf",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.4/java_tools-v13.4.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.4/java_tools-v13.4.zip"
+ ]
+ }
+ },
+ "remotejdk17_linux_s390x": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "ffacba69c6843d7ca70d572489d6cc7ab7ae52c60f0852cedf4cf0d248b6fc37",
+ "strip_prefix": "jdk-17.0.8.1+1",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz",
+ "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_win_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ },
+ "remotejdk11_linux_ppc64le": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "a8fba686f6eb8ae1d1a9566821dbd5a85a1108b96ad857fdbac5c1e4649fc56f",
+ "strip_prefix": "jdk-11.0.15+10",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz",
+ "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_macos_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks ac [...]
+ "sha256": "7632bc29f8a4b7d492b93f3bc75a7b61630894db85d136456035ab2a24d38885",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_win_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"/ [...]
+ }
+ }
+ },
+ "recordedRepoMappingEntries": [
+ [
+ "rules_java~",
+ "bazel_tools",
+ "bazel_tools"
+ ],
+ [
+ "rules_java~",
+ "remote_java_tools",
+ "rules_java~~toolchains~remote_java_tools"
+ ]
+ ]
+ }
+ }
+ }
+}
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 00000000..311b4360
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache ResilientDB
+Copyright 2023-2024 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (/).
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..15d13bcc
--- /dev/null
+++ b/README.md
@@ -0,0 +1,99 @@
+# Usage
+
+## Build and Deploy ResilientDB
+
+This section describes how to quickly build ResilientDB and deploy 4 replicas along with 1 client proxy on your local machine.
+
+The client proxy serves as the interface for all clients. It batches client requests and forwards these batches to the designated leader replica. The 4 replicas then participate in PBFT consensus to order and execute these batches. Once executed, the leader returns the responses to the proxy.
+
+### Step 1: Install Dependencies
+
+```bash
+./INSTALL.sh
+```
+
+### Step 2: Run ResilientDB (Key-Value Service)
+
+```bash
+./service/tools/kv/server_tools/start_kv_service.sh
+```
+
+This script starts 4 replicas and 1 client. Each replica instantiates a key-value store instance.
+
+### Step 3: Build Interactive Tools
+
+```bash
+bazel build service/tools/kv/api_tools/kv_service_tools
+```
+
+## Test Performance
+
+To deploy ResilientDB across multiple machines, edit the file `scripts/deploy/config/kv_performance_server.conf` and add the **private IP addresses** of the target machines for replicas and the client proxy.
+
+> ⚠️ Notes:
+>
+> - If your machines do not require an SSH key for login, update the scripts under `scripts/deploy/script` accordingly.
+> - The default user is assumed to be `ubuntu`, and the working directory `/home/ubuntu/`. Update the scripts if your environment differs.
+> - If your binary is located in a different path, adjust the script paths as needed.
+
+### Configuration
+
+Before testing:
+
+1. Populate `scripts/deploy/config/kv_performance_server.conf` with the private IPs.
+2. Create a key file `config/key.conf` containing your SSH private key.
+ - Refer to the example at `scripts/deploy/config/key_example.conf`.
+
+### Navigate to the Deployment Directory
+
+```bash
+cd scripts/deploy
+```
+
+### Copy TPC-C Database Files to Replicas if Running with TPC-C Benchmark (Skip if Running With Default Key-Value Benchmark)
+
+```bash
+./script/copy_tpcc_db_file.sh
+```
+
+### Run Performance Benchmarks
+
+- **HotStuff-1**:
+
+```bash
+./performance/hs1_performance.sh config/kv_performance_server.conf
+```
+
+- **HotStuff**:
+
+```bash
+./performance/hs_performance.sh config/kv_performance_server.conf
+```
+
+- **HotStuff-2**:
+
+```bash
+./performance/hs2_performance.sh config/kv_performance_server.conf
+```
+
+- **HotStuff-1 with Slotting**:
+
+```bash
+./performance/slot_hs1_performance.sh config/kv_performance_server.conf
+```
+
+Each benchmark runs for 60 seconds. Results are displayed on-screen and also saved locally.
+
+### Customizing Benchmark Parameters
+
+You can adjust various parameters by editing the config files under `scripts/deploy/config/`, such as `hs1.config` for HotStuff-1.
+
+Key parameters include:
+
+- `clientBatchNum`: Size of each client request batch
+- `non_responsive_num`: Number of slow leaders
+- `fork_tail_num`: Number of faulty leaders performing tail-forking
+- `rollback_num`: Number of faulty leaders performing rollback
+- `tpcc_enabled`: Enables the TPC-C benchmark
+- `network_delay_num`: Enables network delay injection
+- `mean_network_delay`: Average delay (in microseconds) of injected messages
\ No newline at end of file
diff --git a/WORKSPACE b/WORKSPACE
new file mode 100644
index 00000000..f285e83f
--- /dev/null
+++ b/WORKSPACE
@@ -0,0 +1,226 @@
+workspace(name = "com_resdb_nexres")
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+load("//:repositories.bzl", "nexres_repositories")
+
+nexres_repositories()
+
+http_archive(
+ name = "rules_foreign_cc",
+ sha256 = "69023642d5781c68911beda769f91fcbc8ca48711db935a75da7f6536b65047f",
+ strip_prefix = "rules_foreign_cc-0.6.0",
+ url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.6.0.tar.gz",
+)
+
+load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
+
+rules_foreign_cc_dependencies()
+
+http_archive(
+ name = "rules_proto",
+ sha256 = "66bfdf8782796239d3875d37e7de19b1d94301e8972b3cbd2446b332429b4df1",
+ strip_prefix = "rules_proto-4.0.0",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
+ "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
+ ],
+)
+
+load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
+
+rules_proto_dependencies()
+
+rules_proto_toolchains()
+
+http_archive(
+ name = "rules_python",
+ sha256 = "ffc7b877c95413c82bfd5482c017edcf759a6250d8b24e82f41f3c8b8d9e287e",
+ strip_prefix = "rules_python-0.19.0",
+ url = "https://github.com/bazelbuild/rules_python/releases/download/0.19.0/rules_python-0.19.0.tar.gz",
+)
+
+load("@rules_python//python:pip.bzl", "pip_install")
+load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
+
+rules_proto_dependencies()
+
+rules_proto_toolchains()
+
+load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")
+
+rules_proto_grpc_toolchains()
+
+rules_proto_grpc_repos()
+
+bind(
+ name = "gtest",
+ actual = "@com_google_googletest//:gtest",
+)
+
+bind(
+ name = "glog",
+ actual = "@com_github_google_glog//:glog",
+)
+
+http_archive(
+ name = "com_github_google_glog",
+ sha256 = "21bc744fb7f2fa701ee8db339ded7dce4f975d0d55837a97be7d46e8382dea5a",
+ strip_prefix = "glog-0.5.0",
+ urls = ["https://github.com/google/glog/archive/v0.5.0.zip"],
+)
+
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
+
+git_repository(
+ name = "com_google_protobuf",
+ remote = "https://github.com/protocolbuffers/protobuf",
+ tag = "v3.10.0",
+)
+
+load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
+
+protobuf_deps()
+
+all_content = """filegroup(name = "all_srcs", srcs = glob(["**"]), visibility = ["//visibility:public"])"""
+
+# buildifier is written in Go and hence needs rules_go to be built.
+# See https://github.com/bazelbuild/rules_go for the up to date setup instructions.
+http_archive(
+ name = "io_bazel_rules_go",
+ sha256 = "d6b2513456fe2229811da7eb67a444be7785f5323c6708b38d851d2b51e54d83",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.30.0/rules_go-v0.30.0.zip",
+ "https://github.com/bazelbuild/rules_go/releases/download/v0.30.0/rules_go-v0.30.0.zip",
+ ],
+)
+
+load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies")
+
+go_rules_dependencies()
+
+load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains")
+
+go_register_toolchains(version = "1.19.5")
+
+http_archive(
+ name = "bazel_gazelle",
+ sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
+ "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
+ ],
+)
+
+load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
+
+gazelle_dependencies()
+
+http_archive(
+ name = "com_github_bazelbuild_buildtools",
+ sha256 = "518b2ce90b1f8ad7c9a319ca84fd7de9a0979dd91e6d21648906ea68faa4f37a",
+ strip_prefix = "buildtools-5.0.1",
+ urls = [
+ "https://github.com/bazelbuild/buildtools/archive/refs/tags/5.0.1.zip",
+ ],
+)
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
+
+boost_deps()
+
+http_archive(
+ name = "net_zlib_zlib",
+ build_file = "@com_resdb_nexres//third_party:z.BUILD",
+ sha256 = "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9",
+ strip_prefix = "zlib-1.2.12",
+ urls = [
+ "https://zlib.net/zlib-1.2.12.tar.gz",
+ "https://storage.googleapis.com/bazel-mirror/zlib.net/zlib-1.2.12.tar.gz",
+ ],
+)
+
+#prometheus cpp client library
+
+http_archive(
+ name = "com_google_leveldb",
+ build_file = "@com_resdb_nexres//third_party:leveldb.BUILD",
+ sha256 = "a6fa7eebd11de709c46bf1501600ed98bf95439d6967963606cc964931ce906f",
+ strip_prefix = "leveldb-1.23",
+ url = "https://github.com/google/leveldb/archive/refs/tags/1.23.zip",
+)
+
+bind(
+ name = "snappy",
+ actual = "@com_google_snappy//:snappy",
+)
+
+http_archive(
+ name = "com_google_snappy",
+ build_file = "@com_resdb_nexres//third_party:snappy.BUILD",
+ sha256 = "e170ce0def2c71d0403f5cda61d6e2743373f9480124bcfcd0fa9b3299d428d9",
+ strip_prefix = "snappy-1.1.9",
+ url = "https://github.com/google/snappy/archive/refs/tags/1.1.9.zip",
+)
+
+bind(
+ name = "zlib",
+ actual = "@com_zlib//:zlib",
+)
+
+http_archive(
+ name = "com_zlib",
+ build_file = "@com_resdb_nexres//third_party:zlib.BUILD",
+ sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
+ strip_prefix = "zlib-1.2.11",
+ url = "https://github.com/madler/zlib/archive/v1.2.11.tar.gz",
+)
+
+bind(
+ name = "zstd",
+ actual = "//third_party:zstd",
+)
+
+http_archive(
+ name = "com_facebook_zstd",
+ build_file_content = all_content,
+ strip_prefix = "zstd-1.5.2",
+ url = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.2.zip",
+)
+
+http_archive(
+ name = "com_github_facebook_rocksdb",
+ build_file = "@com_resdb_nexres//third_party:rocksdb.BUILD",
+ sha256 = "928cbd416c0531e9b2e7fa74864ce0d7097dca3f5a8c31f31459772a28dbfcba",
+ strip_prefix = "rocksdb-7.2.2",
+ url = "https://github.com/facebook/rocksdb/archive/refs/tags/v7.2.2.zip",
+)
+
+http_archive(
+ name = "pybind11_bazel",
+ strip_prefix = "pybind11_bazel-2.11.1.bzl.1",
+ urls = ["https://github.com/pybind/pybind11_bazel/archive/refs/tags/v2.11.1.bzl.1.zip"]
+)
+
+http_archive(
+ name = "pybind11",
+ build_file = "@pybind11_bazel//:pybind11.BUILD",
+ sha256 = "8ff2fff22df038f5cd02cea8af56622bc67f5b64534f1b83b9f133b8366acff2",
+ strip_prefix = "pybind11-2.6.2",
+ urls = ["https://github.com/pybind/pybind11/archive/v2.6.2.tar.gz"],
+)
+
+load("@pybind11_bazel//:python_configure.bzl", "python_configure")
+
+python_configure(
+ name = "local_config_python",
+ python_version = "3",
+)
+
+http_archive(
+ name = "nlohmann_json",
+ build_file = "@com_resdb_nexres//third_party:json.BUILD", # see below
+ sha256 = "4cf0df69731494668bdd6460ed8cb269b68de9c19ad8c27abc24cd72605b2d5b",
+ strip_prefix = "json-3.9.1",
+ urls = ["https://github.com/nlohmann/json/archive/v3.9.1.tar.gz"],
+)
diff --git a/action.yml b/action.yml
new file mode 100644
index 00000000..1946350d
--- /dev/null
+++ b/action.yml
@@ -0,0 +1,53 @@
+# This script is from https://github.com/shadowmoose/GHA-LoC-Badge/blob/master/action.yml
+
+name: 'lines of code Badge'
+description: 'Generate a badge to display total Lines of Code'
+inputs:
+ directory:
+ description: 'The directory to scan.'
+ required: false
+ default: './'
+ badge:
+ description: 'The output path to save the badge svg - including extension!'
+ required: false
+ default: './badge.svg'
+ patterns:
+ description: 'The file patterns to search for, separated by pipes ("|").'
+ required: false
+ default: "**"
+ ignore:
+ description: 'The file patterns to ignore, even if they matched "patterns", separated by pipes ("|").'
+ required: false
+ default: "node_modules"
+ badge_label:
+ description: "The label to use for the badge."
+ required: false
+ default: "lines of code"
+ badge_color:
+ description: "The color to use for the badge."
+ required: false
+ default: "blue"
+ badge_style:
+ description: "The body style to use for the badge. ('flat' or 'classic')"
+ required: false
+ default: "classic"
+ badge_scale:
+ description: "The scale to resize this badge"
+ required: false
+ default: "1"
+ badge_labelcolor:
+ description: "The color to use for this badge label."
+ required: false
+ default: "555"
+ debug:
+ description: 'Enable debug logging'
+ required: false
+ default: 'false'
+
+runs:
+ using: 'node12'
+ main: './src/index.js'
+
+branding:
+ icon: 'award'
+ color: 'green'
diff --git a/benchmark/protocols/hs/BUILD b/benchmark/protocols/hs/BUILD
new file mode 100644
index 00000000..f1c2cb86
--- /dev/null
+++ b/benchmark/protocols/hs/BUILD
@@ -0,0 +1,16 @@
+package(default_visibility = ["//visibility:private"])
+
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+
+cc_binary(
+ name = "kv_server_performance",
+ srcs = ["kv_server_performance.cpp"],
+ deps = [
+ "//chain/storage:memory_db",
+ "//executor/kv:kv_executor",
+ "//platform/config:resdb_config_utils",
+ "//platform/consensus/ordering/hs/framework:consensus",
+ "//service/utils:server_factory",
+ ],
+)
+
diff --git a/benchmark/protocols/hs/kv_server_performance.cpp b/benchmark/protocols/hs/kv_server_performance.cpp
new file mode 100644
index 00000000..05689208
--- /dev/null
+++ b/benchmark/protocols/hs/kv_server_performance.cpp
@@ -0,0 +1,88 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include <glog/logging.h>
+
+#include "chain/storage/memory_db.h"
+#include "executor/kv/kv_executor.h"
+#include "platform/config/resdb_config_utils.h"
+#include "platform/consensus/ordering/hs/framework/consensus.h"
+#include "platform/networkstrate/service_network.h"
+#include "platform/statistic/stats.h"
+#include "proto/kv/kv.pb.h"
+
+using namespace resdb;
+using namespace resdb::hs;
+using namespace resdb::storage;
+
+void ShowUsage() {
+ printf("<config> <private_key> <cert_file> [logging_dir]\n");
+}
+
+std::string GetRandomKey() {
+ int num1 = rand() % 10;
+ int num2 = rand() % 10;
+ return std::to_string(num1) + std::to_string(num2);
+}
+
+int main(int argc, char** argv) {
+ if (argc < 3) {
+ ShowUsage();
+ exit(0);
+ }
+
+ // google::InitGoogleLogging(argv[0]);
+ // FLAGS_minloglevel = google::GLOG_WARNING;
+
+ char* config_file = argv[1];
+ char* private_key_file = argv[2];
+ char* cert_file = argv[3];
+
+ if (argc >= 5) {
+ auto monitor_port = Stats::GetGlobalStats(5);
+ monitor_port->SetPrometheus(argv[4]);
+ }
+
+ std::unique_ptr<ResDBConfig> config =
+ GenerateResDBConfig(config_file, private_key_file, cert_file);
+
+ config->RunningPerformance(true);
+
+ auto performance_consens = std::make_unique<hs::Consensus>(
+ *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
+ performance_consens->SetupPerformanceDataFunc([]() {
+ KVRequest request;
+ request.set_cmd(KVRequest::SET);
+ request.set_key(GetRandomKey());
+ request.set_value("helloworld");
+ std::string request_data;
+ request.SerializeToString(&request_data);
+ return request_data;
+ });
+
+ auto server =
+ std::make_unique<ServiceNetwork>(*config, std::move(performance_consens));
+ server->Run();
+}
diff --git a/benchmark/protocols/hs1/BUILD b/benchmark/protocols/hs1/BUILD
new file mode 100644
index 00000000..a6e6d853
--- /dev/null
+++ b/benchmark/protocols/hs1/BUILD
@@ -0,0 +1,16 @@
+package(default_visibility = ["//visibility:private"])
+
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+
+cc_binary(
+ name = "kv_server_performance",
+ srcs = ["kv_server_performance.cpp"],
+ deps = [
+ "//chain/storage:memory_db",
+ "//executor/kv:kv_executor",
+ "//platform/config:resdb_config_utils",
+ "//platform/consensus/ordering/hs1/framework:consensus",
+ "//service/utils:server_factory",
+ ],
+)
+
diff --git a/benchmark/protocols/hs1/kv_server_performance.cpp b/benchmark/protocols/hs1/kv_server_performance.cpp
new file mode 100644
index 00000000..5a66198e
--- /dev/null
+++ b/benchmark/protocols/hs1/kv_server_performance.cpp
@@ -0,0 +1,88 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include <glog/logging.h>
+
+#include "chain/storage/memory_db.h"
+#include "executor/kv/kv_executor.h"
+#include "platform/config/resdb_config_utils.h"
+#include "platform/consensus/ordering/hs1/framework/consensus.h"
+#include "platform/networkstrate/service_network.h"
+#include "platform/statistic/stats.h"
+#include "proto/kv/kv.pb.h"
+
+using namespace resdb;
+using namespace resdb::hs1;
+using namespace resdb::storage;
+
+void ShowUsage() {
+ printf("<config> <private_key> <cert_file> [logging_dir]\n");
+}
+
+std::string GetRandomKey() {
+ int num1 = rand() % 10;
+ int num2 = rand() % 10;
+ return std::to_string(num1) + std::to_string(num2);
+}
+
+int main(int argc, char** argv) {
+ if (argc < 3) {
+ ShowUsage();
+ exit(0);
+ }
+
+ // google::InitGoogleLogging(argv[0]);
+ // FLAGS_minloglevel = google::GLOG_WARNING;
+
+ char* config_file = argv[1];
+ char* private_key_file = argv[2];
+ char* cert_file = argv[3];
+
+ if (argc >= 5) {
+ auto monitor_port = Stats::GetGlobalStats(5);
+ monitor_port->SetPrometheus(argv[4]);
+ }
+
+ std::unique_ptr<ResDBConfig> config =
+ GenerateResDBConfig(config_file, private_key_file, cert_file);
+
+ config->RunningPerformance(true);
+
+ auto performance_consens = std::make_unique<hs1::Consensus>(
+ *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
+ performance_consens->SetupPerformanceDataFunc([]() {
+ KVRequest request;
+ request.set_cmd(KVRequest::SET);
+ request.set_key(GetRandomKey());
+ request.set_value("helloworld");
+ std::string request_data;
+ request.SerializeToString(&request_data);
+ return request_data;
+ });
+
+ auto server =
+ std::make_unique<ServiceNetwork>(*config, std::move(performance_consens));
+ server->Run();
+}
diff --git a/benchmark/protocols/hs2/BUILD b/benchmark/protocols/hs2/BUILD
new file mode 100644
index 00000000..795a4c93
--- /dev/null
+++ b/benchmark/protocols/hs2/BUILD
@@ -0,0 +1,16 @@
+package(default_visibility = ["//visibility:private"])
+
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+
+cc_binary(
+ name = "kv_server_performance",
+ srcs = ["kv_server_performance.cpp"],
+ deps = [
+ "//chain/storage:memory_db",
+ "//executor/kv:kv_executor",
+ "//platform/config:resdb_config_utils",
+ "//platform/consensus/ordering/hs2/framework:consensus",
+ "//service/utils:server_factory",
+ ],
+)
+
diff --git a/benchmark/protocols/hs2/kv_server_performance.cpp b/benchmark/protocols/hs2/kv_server_performance.cpp
new file mode 100644
index 00000000..44cf0d5f
--- /dev/null
+++ b/benchmark/protocols/hs2/kv_server_performance.cpp
@@ -0,0 +1,88 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include <glog/logging.h>
+
+#include "chain/storage/memory_db.h"
+#include "executor/kv/kv_executor.h"
+#include "platform/config/resdb_config_utils.h"
+#include "platform/consensus/ordering/hs2/framework/consensus.h"
+#include "platform/networkstrate/service_network.h"
+#include "platform/statistic/stats.h"
+#include "proto/kv/kv.pb.h"
+
+using namespace resdb;
+using namespace resdb::hs2;
+using namespace resdb::storage;
+
+void ShowUsage() {
+ printf("<config> <private_key> <cert_file> [logging_dir]\n");
+}
+
+std::string GetRandomKey() {
+ int num1 = rand() % 10;
+ int num2 = rand() % 10;
+ return std::to_string(num1) + std::to_string(num2);
+}
+
+int main(int argc, char** argv) {
+ if (argc < 3) {
+ ShowUsage();
+ exit(0);
+ }
+
+ // google::InitGoogleLogging(argv[0]);
+ // FLAGS_minloglevel = google::GLOG_WARNING;
+
+ char* config_file = argv[1];
+ char* private_key_file = argv[2];
+ char* cert_file = argv[3];
+
+ if (argc >= 5) {
+ auto monitor_port = Stats::GetGlobalStats(5);
+ monitor_port->SetPrometheus(argv[4]);
+ }
+
+ std::unique_ptr<ResDBConfig> config =
+ GenerateResDBConfig(config_file, private_key_file, cert_file);
+
+ config->RunningPerformance(true);
+
+ auto performance_consens = std::make_unique<hs2::Consensus>(
+ *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
+ performance_consens->SetupPerformanceDataFunc([]() {
+ KVRequest request;
+ request.set_cmd(KVRequest::SET);
+ request.set_key(GetRandomKey());
+ request.set_value("helloworld");
+ std::string request_data;
+ request.SerializeToString(&request_data);
+ return request_data;
+ });
+
+ auto server =
+ std::make_unique<ServiceNetwork>(*config, std::move(performance_consens));
+ server->Run();
+}
diff --git a/benchmark/protocols/slot_hs1/BUILD b/benchmark/protocols/slot_hs1/BUILD
new file mode 100644
index 00000000..5f6fca0c
--- /dev/null
+++ b/benchmark/protocols/slot_hs1/BUILD
@@ -0,0 +1,16 @@
+package(default_visibility = ["//visibility:private"])
+
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+
+cc_binary(
+ name = "kv_server_performance",
+ srcs = ["kv_server_performance.cpp"],
+ deps = [
+ "//chain/storage:memory_db",
+ "//executor/kv:kv_executor",
+ "//platform/config:resdb_config_utils",
+ "//platform/consensus/ordering/slot_hs1/framework:consensus",
+ "//service/utils:server_factory",
+ ],
+)
+
diff --git a/benchmark/protocols/slot_hs1/kv_server_performance.cpp b/benchmark/protocols/slot_hs1/kv_server_performance.cpp
new file mode 100644
index 00000000..a53d5554
--- /dev/null
+++ b/benchmark/protocols/slot_hs1/kv_server_performance.cpp
@@ -0,0 +1,88 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include <glog/logging.h>
+
+#include "chain/storage/memory_db.h"
+#include "executor/kv/kv_executor.h"
+#include "platform/config/resdb_config_utils.h"
+#include "platform/consensus/ordering/slot_hs1/framework/consensus.h"
+#include "platform/networkstrate/service_network.h"
+#include "platform/statistic/stats.h"
+#include "proto/kv/kv.pb.h"
+
+using namespace resdb;
+using namespace resdb::slot_hs1;
+using namespace resdb::storage;
+
+void ShowUsage() {
+ printf("<config> <private_key> <cert_file> [logging_dir]\n");
+}
+
+std::string GetRandomKey() {
+ int num1 = rand() % 10;
+ int num2 = rand() % 10;
+ return std::to_string(num1) + std::to_string(num2);
+}
+
+int main(int argc, char** argv) {
+ if (argc < 3) {
+ ShowUsage();
+ exit(0);
+ }
+
+ // google::InitGoogleLogging(argv[0]);
+ // FLAGS_minloglevel = google::GLOG_WARNING;
+
+ char* config_file = argv[1];
+ char* private_key_file = argv[2];
+ char* cert_file = argv[3];
+
+ if (argc >= 5) {
+ auto monitor_port = Stats::GetGlobalStats(5);
+ monitor_port->SetPrometheus(argv[4]);
+ }
+
+ std::unique_ptr<ResDBConfig> config =
+ GenerateResDBConfig(config_file, private_key_file, cert_file);
+
+ config->RunningPerformance(true);
+
+ auto performance_consens = std::make_unique<slot_hs1::Consensus>(
+ *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
+ performance_consens->SetupPerformanceDataFunc([]() {
+ KVRequest request;
+ request.set_cmd(KVRequest::SET);
+ request.set_key(GetRandomKey());
+ request.set_value("helloworld");
+ std::string request_data;
+ request.SerializeToString(&request_data);
+ return request_data;
+ });
+
+ auto server =
+ std::make_unique<ServiceNetwork>(*config, std::move(performance_consens));
+ server->Run();
+}
diff --git a/chain/state/BUILD b/chain/state/BUILD
new file mode 100644
index 00000000..5bd5d118
--- /dev/null
+++ b/chain/state/BUILD
@@ -0,0 +1,20 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "chain_state",
+ srcs = ["chain_state.cpp"],
+ hdrs = ["chain_state.h"],
+ deps = [
+ "//common:comm",
+ "//platform/proto:resdb_cc_proto",
+ ],
+)
+
+cc_test(
+ name = "chain_state_test",
+ srcs = ["chain_state_test.cpp"],
+ deps = [
+ ":chain_state",
+ "//common/test:test_main",
+ ],
+)
diff --git a/chain/state/chain_state.cpp b/chain/state/chain_state.cpp
new file mode 100644
index 00000000..18eaed71
--- /dev/null
+++ b/chain/state/chain_state.cpp
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "chain/state/chain_state.h"
+
+#include <glog/logging.h>
+
+namespace resdb {
+
+ChainState::ChainState() : max_seq_(0) {}
+
+Request* ChainState::Get(uint64_t seq) {
+ std::unique_lock<std::mutex> lk(mutex_);
+ if (data_.find(seq) == data_.end()) {
+ return nullptr;
+ }
+ return data_[seq].get();
+}
+
+void ChainState::Put(std::unique_ptr<Request> request) {
+ std::unique_lock<std::mutex> lk(mutex_);
+ max_seq_ = request->seq();
+ data_[max_seq_] = std::move(request);
+}
+
+uint64_t ChainState::GetMaxSeq() { return max_seq_; }
+
+} // namespace resdb
diff --git a/chain/state/chain_state.h b/chain/state/chain_state.h
new file mode 100644
index 00000000..697b1afc
--- /dev/null
+++ b/chain/state/chain_state.h
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include <map>
+#include <unordered_map>
+
+#include "platform/proto/resdb.pb.h"
+
+namespace resdb {
+
+class ChainState {
+ public:
+ ChainState();
+ Request* Get(uint64_t seq);
+ void Put(std::unique_ptr<Request> request);
+ uint64_t GetMaxSeq();
+
+ private:
+ std::mutex mutex_;
+ std::unordered_map<uint64_t, std::unique_ptr<Request> > data_;
+ std::atomic<uint64_t> max_seq_;
+};
+
+} // namespace resdb
diff --git a/chain/state/chain_state_test.cpp b/chain/state/chain_state_test.cpp
new file mode 100644
index 00000000..7fd3fbe1
--- /dev/null
+++ b/chain/state/chain_state_test.cpp
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "chain/state/chain_state.h"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include "common/test/test_macros.h"
+
+namespace resdb {
+namespace {
+
+using ::resdb::testing::EqualsProto;
+using ::testing::Pointee;
+
+TEST(ChainStateTest, GetEmptyValue) {
+ ChainState db;
+ EXPECT_EQ(db.Get(1), nullptr);
+}
+
+TEST(ChainStateTest, GetValue) {
+ Request request;
+ request.set_seq(1);
+ request.set_data("test");
+
+ ChainState db;
+ db.Put(std::make_unique<Request>(request));
+ EXPECT_THAT(db.Get(1), Pointee(EqualsProto(request)));
+}
+
+TEST(ChainStateTest, GetSecondValue) {
+ Request request;
+ request.set_seq(1);
+ request.set_data("test");
+
+ ChainState db;
+ db.Put(std::make_unique<Request>(request));
+
+ request.set_seq(1);
+ request.set_data("test_1");
+ db.Put(std::make_unique<Request>(request));
+
+ EXPECT_THAT(db.Get(1), Pointee(EqualsProto(request)));
+}
+
+} // namespace
+
+} // namespace resdb
diff --git a/chain/storage/BUILD b/chain/storage/BUILD
new file mode 100644
index 00000000..57904291
--- /dev/null
+++ b/chain/storage/BUILD
@@ -0,0 +1,64 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "storage",
+ hdrs = ["storage.h"],
+ deps = [
+ ],
+)
+
+cc_library(
+ name = "mock_storage",
+ hdrs = ["mock_storage.h"],
+ deps = [
+ ":storage",
+ ],
+)
+
+cc_library(
+ name = "memory_db",
+ srcs = ["memory_db.cpp"],
+ hdrs = ["memory_db.h"],
+ deps = [
+ ":storage",
+ "//common:comm",
+ ],
+)
+
+cc_library(
+ name = "leveldb",
+ srcs = ["leveldb.cpp"],
+ hdrs = ["leveldb.h"],
+ deps = [
+ ":storage",
+ "//chain/storage/proto:kv_cc_proto",
+ "//chain/storage/proto:leveldb_config_cc_proto",
+ "//common:comm",
+ "//third_party:leveldb",
+ ],
+)
+
+cc_library(
+ name = "rocksdb",
+ srcs = ["rocksdb.cpp"],
+ hdrs = ["rocksdb.h"],
+ tags = ["manual"],
+ deps = [
+ ":storage",
+ "//chain/storage/proto:kv_cc_proto",
+ "//chain/storage/proto:rocksdb_config_cc_proto",
+ "//common:comm",
+ "//third_party:rocksdb",
+ ],
+)
+
+cc_test(
+ name = "kv_storage_test",
+ srcs = ["kv_storage_test.cpp"],
+ deps = [
+ ":leveldb",
+ ":memory_db",
+ ":rocksdb",
+ "//common/test:test_main",
+ ],
+)
diff --git a/chain/storage/kv_storage_test.cpp b/chain/storage/kv_storage_test.cpp
new file mode 100644
index 00000000..701dcbd9
--- /dev/null
+++ b/chain/storage/kv_storage_test.cpp
@@ -0,0 +1,232 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <glog/logging.h>
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include <filesystem>
+
+#include "chain/storage/leveldb.h"
+#include "chain/storage/memory_db.h"
+#include "chain/storage/rocksdb.h"
+
+namespace resdb {
+namespace storage {
+namespace {
+
+enum StorageType {
+ MEM = 0,
+ LEVELDB = 1,
+ ROCKSDB = 2,
+};
+
+class KVStorageTest : public ::testing::TestWithParam<StorageType> {
+ protected:
+ KVStorageTest() {
+ StorageType t = GetParam();
+ switch (t) {
+ case MEM:
+ storage = NewMemoryDB();
+ break;
+ case LEVELDB:
+ Reset();
+ storage = NewResLevelDB(path_);
+ break;
+ case ROCKSDB:
+ Reset();
+ storage = NewResRocksDB(path_);
+ break;
+ }
+ }
+
+ private:
+ void Reset() { std::filesystem::remove_all(path_.c_str()); }
+
+ protected:
+ std::unique_ptr<Storage> storage;
+ std::string path_ = "/tmp/leveldb_test";
+};
+
+TEST_P(KVStorageTest, SetValue) {
+ EXPECT_EQ(storage->SetValue("test_key", "test_value"), 0);
+ EXPECT_EQ(storage->GetValue("test_key"), "test_value");
+}
+
+TEST_P(KVStorageTest, GetValue) {
+ EXPECT_EQ(storage->GetValue("test_key"), "");
+}
+
+TEST_P(KVStorageTest, GetEmptyValueWithVersion) {
+ EXPECT_EQ(storage->GetValueWithVersion("test_key", 0),
+ std::make_pair(std::string(""), 0));
+}
+
+TEST_P(KVStorageTest, SetValueWithVersion) {
+ EXPECT_EQ(storage->SetValueWithVersion("test_key", "test_value", 1), -2);
+
+ EXPECT_EQ(storage->SetValueWithVersion("test_key", "test_value", 0), 0);
+
+ EXPECT_EQ(storage->GetValueWithVersion("test_key", 0),
+ std::make_pair(std::string("test_value"), 1));
+ EXPECT_EQ(storage->GetValueWithVersion("test_key", 1),
+ std::make_pair(std::string("test_value"), 1));
+
+ EXPECT_EQ(storage->SetValueWithVersion("test_key", "test_value_v2", 2), -2);
+ EXPECT_EQ(storage->SetValueWithVersion("test_key", "test_value_v2", 1), 0);
+
+ EXPECT_EQ(storage->GetValueWithVersion("test_key", 0),
+ std::make_pair(std::string("test_value_v2"), 2));
+
+ EXPECT_EQ(storage->GetValueWithVersion("test_key", 1),
+ std::make_pair(std::string("test_value"), 1));
+
+ EXPECT_EQ(storage->GetValueWithVersion("test_key", 2),
+ std::make_pair(std::string("test_value_v2"), 2));
+
+ EXPECT_EQ(storage->GetValueWithVersion("test_key", 3),
+ std::make_pair(std::string("test_value_v2"), 2));
+}
+
+TEST_P(KVStorageTest, GetAllValueWithVersion) {
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("test_key", std::make_pair("test_value", 1))};
+
+ EXPECT_EQ(storage->SetValueWithVersion("test_key", "test_value", 0), 0);
+ EXPECT_EQ(storage->GetAllItems(), expected_list);
+ }
+
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("test_key", std::make_pair("test_value_v2", 2))};
+ EXPECT_EQ(storage->SetValueWithVersion("test_key", "test_value_v2", 1), 0);
+ EXPECT_EQ(storage->GetAllItems(), expected_list);
+ }
+
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("test_key_v1", std::make_pair("test_value1", 1)),
+ std::make_pair("test_key", std::make_pair("test_value_v2", 2))};
+ EXPECT_EQ(storage->SetValueWithVersion("test_key_v1", "test_value1", 0), 0);
+ EXPECT_EQ(storage->GetAllItems(), expected_list);
+ }
+}
+
+TEST_P(KVStorageTest, GetKeyRange) {
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value1", 0), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("2", "value2", 0), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("3", "value3", 0), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("4", "value4", 0), 0);
+
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("1", std::make_pair("value1", 1)),
+ std::make_pair("2", std::make_pair("value2", 1)),
+ std::make_pair("3", std::make_pair("value3", 1)),
+ std::make_pair("4", std::make_pair("value4", 1))};
+ EXPECT_EQ(storage->GetKeyRange("1", "4"), expected_list);
+ }
+
+ EXPECT_EQ(storage->SetValueWithVersion("3", "value3_1", 1), 0);
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("1", std::make_pair("value1", 1)),
+ std::make_pair("2", std::make_pair("value2", 1)),
+ std::make_pair("3", std::make_pair("value3_1", 2)),
+ std::make_pair("4", std::make_pair("value4", 1))};
+ EXPECT_EQ(storage->GetKeyRange("1", "4"), expected_list);
+ }
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("1", std::make_pair("value1", 1)),
+ std::make_pair("2", std::make_pair("value2", 1)),
+ std::make_pair("3", std::make_pair("value3_1", 2)),
+ };
+ EXPECT_EQ(storage->GetKeyRange("1", "3"), expected_list);
+ }
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("2", std::make_pair("value2", 1)),
+ std::make_pair("3", std::make_pair("value3_1", 2)),
+ std::make_pair("4", std::make_pair("value4", 1))};
+ EXPECT_EQ(storage->GetKeyRange("2", "4"), expected_list);
+ }
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("1", std::make_pair("value1", 1)),
+ std::make_pair("2", std::make_pair("value2", 1)),
+ std::make_pair("3", std::make_pair("value3_1", 2)),
+ std::make_pair("4", std::make_pair("value4", 1))};
+ EXPECT_EQ(storage->GetKeyRange("0", "5"), expected_list);
+ }
+ {
+ std::map<std::string, std::pair<std::string, int> > expected_list{
+ std::make_pair("2", std::make_pair("value2", 1)),
+ std::make_pair("3", std::make_pair("value3_1", 2)),
+ };
+ EXPECT_EQ(storage->GetKeyRange("2", "3"), expected_list);
+ }
+}
+
+TEST_P(KVStorageTest, GetHistory) {
+ {
+ std::vector<std::pair<std::string, int> > expected_list{};
+ EXPECT_EQ(storage->GetHistory("1", 1, 5), expected_list);
+ }
+ {
+ std::vector<std::pair<std::string, int> > expected_list{
+ std::make_pair("value3", 3), std::make_pair("value2", 2),
+ std::make_pair("value1", 1)};
+
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value1", 0), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value2", 1), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value3", 2), 0);
+
+ EXPECT_EQ(storage->GetHistory("1", 1, 5), expected_list);
+ }
+
+ {
+ std::vector<std::pair<std::string, int> > expected_list{
+ std::make_pair("value5", 5), std::make_pair("value4", 4),
+ std::make_pair("value3", 3), std::make_pair("value2", 2),
+ std::make_pair("value1", 1)};
+
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value4", 3), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value5", 4), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value6", 5), 0);
+ EXPECT_EQ(storage->SetValueWithVersion("1", "value7", 6), 0);
+
+ EXPECT_EQ(storage->GetHistory("1", 1, 5), expected_list);
+ }
+
+ {
+ std::vector<std::pair<std::string, int> > expected_list{
+ std::make_pair("value7", 7), std::make_pair("value6", 6)};
+
+ EXPECT_EQ(storage->GetTopHistory("1", 2), expected_list);
+ }
+}
+
+INSTANTIATE_TEST_CASE_P(KVStorageTest, KVStorageTest,
+ ::testing::Values(MEM, LEVELDB, ROCKSDB));
+
+} // namespace
+} // namespace storage
+} // namespace resdb
diff --git a/chain/storage/leveldb.cpp b/chain/storage/leveldb.cpp
new file mode 100644
index 00000000..2cc96fb5
--- /dev/null
+++ b/chain/storage/leveldb.cpp
@@ -0,0 +1,290 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "chain/storage/leveldb.h"
+
+#include <glog/logging.h>
+
+#include "chain/storage/proto/kv.pb.h"
+
+namespace resdb {
+namespace storage {
+
+std::unique_ptr<Storage> NewResLevelDB(const std::string& path,
+ std::optional<LevelDBInfo> config) {
+ if (config == std::nullopt) {
+ config = LevelDBInfo();
+ }
+ (*config).set_path(path);
+ return std::make_unique<ResLevelDB>(config);
+}
+
+std::unique_ptr<Storage> NewResLevelDB(std::optional<LevelDBInfo> config) {
+ return std::make_unique<ResLevelDB>(config);
+}
+
+ResLevelDB::ResLevelDB(std::optional<LevelDBInfo> config) {
+ std::string path = "/tmp/nexres-leveldb";
+ if (config.has_value()) {
+ write_buffer_size_ = (*config).write_buffer_size_mb() << 20;
+ write_batch_size_ = (*config).write_batch_size();
+ if (!(*config).path().empty()) {
+ LOG(ERROR) << "Custom path for ResLevelDB provided in config: "
+ << (*config).path();
+ path = (*config).path();
+ }
+ }
+ CreateDB(path);
+}
+
+void ResLevelDB::CreateDB(const std::string& path) {
+ LOG(ERROR) << "ResLevelDB Create DB: path:" << path
+ << " write buffer size:" << write_buffer_size_
+ << " batch size:" << write_batch_size_;
+ leveldb::Options options;
+ options.create_if_missing = true;
+ options.write_buffer_size = write_buffer_size_;
+
+ leveldb::DB* db = nullptr;
+ leveldb::Status status = leveldb::DB::Open(options, path, &db);
+ if (status.ok()) {
+ db_ = std::unique_ptr<leveldb::DB>(db);
+ }
+ assert(status.ok());
+ LOG(ERROR) << "Successfully opened LevelDB";
+}
+
+ResLevelDB::~ResLevelDB() {
+ if (db_) {
+ db_.reset();
+ }
+}
+
+int ResLevelDB::SetValue(const std::string& key, const std::string& value) {
+ batch_.Put(key, value);
+
+ if (batch_.ApproximateSize() >= write_batch_size_) {
+ leveldb::Status status = db_->Write(leveldb::WriteOptions(), &batch_);
+ if (status.ok()) {
+ batch_.Clear();
+ return 0;
+ } else {
+ LOG(ERROR) << "flush buffer fail:" << status.ToString();
+ return -1;
+ }
+ }
+ return 0;
+}
+
+std::string ResLevelDB::GetValue(const std::string& key) {
+ std::string value = "";
+ leveldb::Status status = db_->Get(leveldb::ReadOptions(), key, &value);
+ if (status.ok()) {
+ return value;
+ } else {
+ return "";
+ }
+}
+
+std::string ResLevelDB::GetAllValues(void) {
+ std::string values = "[";
+ leveldb::Iterator* it = db_->NewIterator(leveldb::ReadOptions());
+ bool first_iteration = true;
+ for (it->SeekToFirst(); it->Valid(); it->Next()) {
+ if (!first_iteration) values.append(",");
+ first_iteration = false;
+ values.append(it->value().ToString());
+ }
+ values.append("]");
+
+ delete it;
+ return values;
+}
+
+std::string ResLevelDB::GetRange(const std::string& min_key,
+ const std::string& max_key) {
+ std::string values = "[";
+ leveldb::Iterator* it = db_->NewIterator(leveldb::ReadOptions());
+ bool first_iteration = true;
+ for (it->Seek(min_key); it->Valid() && it->key().ToString() <= max_key;
+ it->Next()) {
+ if (!first_iteration) values.append(",");
+ first_iteration = false;
+ values.append(it->value().ToString());
+ }
+ values.append("]");
+
+ delete it;
+ return values;
+}
+
+bool ResLevelDB::Flush() {
+ leveldb::Status status = db_->Write(leveldb::WriteOptions(), &batch_);
+ if (status.ok()) {
+ batch_.Clear();
+ return true;
+ }
+ LOG(ERROR) << "flush buffer fail:" << status.ToString();
+ return false;
+}
+
+int ResLevelDB::SetValueWithVersion(const std::string& key,
+ const std::string& value, int version) {
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return -2;
+ }
+
+ int last_v = 0;
+ if (history.value_size() > 0) {
+ last_v = history.value(history.value_size() - 1).version();
+ }
+
+ if (last_v != version) {
+ LOG(ERROR) << "version does not match:" << version
+ << " old version:" << last_v;
+ return -2;
+ }
+
+ Value* new_value = history.add_value();
+ new_value->set_value(value);
+ new_value->set_version(version + 1);
+
+ history.SerializeToString(&value_str);
+ return SetValue(key, value_str);
+}
+
+std::pair<std::string, int> ResLevelDB::GetValueWithVersion(
+ const std::string& key, int version) {
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return std::make_pair("", 0);
+ }
+ if (history.value_size() == 0) {
+ return std::make_pair("", 0);
+ }
+ if (version > 0) {
+ for (int i = history.value_size() - 1; i >= 0; --i) {
+ if (history.value(i).version() == version) {
+ return std::make_pair(history.value(i).value(),
+ history.value(i).version());
+ }
+ if (history.value(i).version() < version) {
+ break;
+ }
+ }
+ }
+ int last_idx = history.value_size() - 1;
+ return std::make_pair(history.value(last_idx).value(),
+ history.value(last_idx).version());
+}
+
+// Return a map of <key, <value, version>>
+std::map<std::string, std::pair<std::string, int>> ResLevelDB::GetAllItems() {
+ std::map<std::string, std::pair<std::string, int>> resp;
+
+ leveldb::Iterator* it = db_->NewIterator(leveldb::ReadOptions());
+ for (it->SeekToFirst(); it->Valid(); it->Next()) {
+ ValueHistory history;
+ if (!history.ParseFromString(it->value().ToString()) ||
+ history.value_size() == 0) {
+ LOG(ERROR) << "old_value parse fail";
+ continue;
+ }
+ const Value& value = history.value(history.value_size() - 1);
+ resp.insert(std::make_pair(it->key().ToString(),
+ std::make_pair(value.value(), value.version())));
+ }
+ delete it;
+
+ return resp;
+}
+
+std::map<std::string, std::pair<std::string, int>> ResLevelDB::GetKeyRange(
+ const std::string& min_key, const std::string& max_key) {
+ std::map<std::string, std::pair<std::string, int>> resp;
+
+ leveldb::Iterator* it = db_->NewIterator(leveldb::ReadOptions());
+ for (it->Seek(min_key); it->Valid() && it->key().ToString() <= max_key;
+ it->Next()) {
+ ValueHistory history;
+ if (!history.ParseFromString(it->value().ToString()) ||
+ history.value_size() == 0) {
+ LOG(ERROR) << "old_value parse fail";
+ continue;
+ }
+ const Value& value = history.value(history.value_size() - 1);
+ resp.insert(std::make_pair(it->key().ToString(),
+ std::make_pair(value.value(), value.version())));
+ }
+ delete it;
+
+ return resp;
+}
+
+// Return a list of <value, version>
+std::vector<std::pair<std::string, int>> ResLevelDB::GetHistory(
+ const std::string& key, int min_version, int max_version) {
+ std::vector<std::pair<std::string, int>> resp;
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return resp;
+ }
+
+ for (int i = history.value_size() - 1; i >= 0; --i) {
+ if (history.value(i).version() < min_version) {
+ break;
+ }
+ if (history.value(i).version() <= max_version) {
+ resp.push_back(
+ std::make_pair(history.value(i).value(), history.value(i).version()));
+ }
+ }
+
+ return resp;
+}
+
+// Return a list of <value, version>
+std::vector<std::pair<std::string, int>> ResLevelDB::GetTopHistory(
+ const std::string& key, int top_number) {
+ std::vector<std::pair<std::string, int>> resp;
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return resp;
+ }
+
+ for (int i = history.value_size() - 1;
+ i >= 0 && resp.size() < static_cast<size_t>(top_number); --i) {
+ resp.push_back(
+ std::make_pair(history.value(i).value(), history.value(i).version()));
+ }
+
+ return resp;
+}
+
+} // namespace storage
+} // namespace resdb
diff --git a/chain/storage/leveldb.h b/chain/storage/leveldb.h
new file mode 100644
index 00000000..199f1f27
--- /dev/null
+++ b/chain/storage/leveldb.h
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <optional>
+#include <string>
+
+#include "chain/storage/proto/leveldb_config.pb.h"
+#include "chain/storage/storage.h"
+#include "leveldb/db.h"
+#include "leveldb/write_batch.h"
+
+namespace resdb {
+namespace storage {
+
+std::unique_ptr<Storage> NewResLevelDB(
+ const std::string& path, std::optional<LevelDBInfo> config = std::nullopt);
+std::unique_ptr<Storage> NewResLevelDB(
+ std::optional<LevelDBInfo> config = std::nullopt);
+
+class ResLevelDB : public Storage {
+ public:
+ ResLevelDB(std::optional<LevelDBInfo> config_data = std::nullopt);
+
+ virtual ~ResLevelDB();
+ int SetValue(const std::string& key, const std::string& value) override;
+ std::string GetValue(const std::string& key) override;
+ std::string GetAllValues(void) override;
+ std::string GetRange(const std::string& min_key,
+ const std::string& max_key) override;
+
+ int SetValueWithVersion(const std::string& key, const std::string& value,
+ int version) override;
+ std::pair<std::string, int> GetValueWithVersion(const std::string& key,
+ int version) override;
+
+ // Return a map of <key, <value, version>>
+ std::map<std::string, std::pair<std::string, int>> GetAllItems() override;
+ std::map<std::string, std::pair<std::string, int>> GetKeyRange(
+ const std::string& min_key, const std::string& max_key) override;
+
+ // Return a list of <value, version>
+ std::vector<std::pair<std::string, int>> GetHistory(const std::string& key,
+ int min_version,
+ int max_version) override;
+
+ std::vector<std::pair<std::string, int>> GetTopHistory(
+ const std::string& key, int top_number) override;
+
+ bool Flush() override;
+
+ private:
+ void CreateDB(const std::string& path);
+
+ private:
+ std::unique_ptr<leveldb::DB> db_ = nullptr;
+ ::leveldb::WriteBatch batch_;
+ unsigned int write_buffer_size_ = 64 << 20;
+ unsigned int write_batch_size_ = 1;
+};
+
+} // namespace storage
+} // namespace resdb
diff --git a/chain/storage/memory_db.cpp b/chain/storage/memory_db.cpp
new file mode 100644
index 00000000..2d5b8725
--- /dev/null
+++ b/chain/storage/memory_db.cpp
@@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "chain/storage/memory_db.h"
+
+#include <glog/logging.h>
+
+namespace resdb {
+namespace storage {
+
+std::unique_ptr<Storage> NewMemoryDB() { return std::make_unique<MemoryDB>(); }
+
+MemoryDB::MemoryDB() {}
+
+int MemoryDB::SetValue(const std::string& key, const std::string& value) {
+ kv_map_[key] = value;
+ return 0;
+}
+
+std::string MemoryDB::GetAllValues(void) {
+ std::string values = "[";
+ bool first_iteration = true;
+ for (auto kv : kv_map_) {
+ if (!first_iteration) values.append(",");
+ first_iteration = false;
+ values.append(kv.second);
+ }
+ values.append("]");
+ return values;
+}
+
+std::string MemoryDB::GetRange(const std::string& min_key,
+ const std::string& max_key) {
+ std::string values = "[";
+ bool first_iteration = true;
+ for (auto kv : kv_map_) {
+ if (kv.first >= min_key && kv.first <= max_key) {
+ if (!first_iteration) values.append(",");
+ first_iteration = false;
+ values.append(kv.second);
+ }
+ }
+ values.append("]");
+ return values;
+}
+
+std::string MemoryDB::GetValue(const std::string& key) {
+ auto search = kv_map_.find(key);
+ if (search != kv_map_.end())
+ return search->second;
+ else {
+ return "";
+ }
+}
+
+int MemoryDB::SetValueWithVersion(const std::string& key,
+ const std::string& value, int version) {
+ auto it = kv_map_with_v_.find(key);
+ if ((it == kv_map_with_v_.end() && version != 0) ||
+ (it != kv_map_with_v_.end() && it->second.back().second != version)) {
+ LOG(ERROR) << " value version not match. key:" << key << " db version:"
+ << (it == kv_map_with_v_.end() ? 0 : it->second.back().second)
+ << " user version:" << version;
+ return -2;
+ }
+ kv_map_with_v_[key].push_back(std::make_pair(value, version + 1));
+ return 0;
+}
+
+std::pair<std::string, int> MemoryDB::GetValueWithVersion(
+ const std::string& key, int version) {
+ auto search_it = kv_map_with_v_.find(key);
+ if (search_it != kv_map_with_v_.end() && search_it->second.size()) {
+ auto it = search_it->second.end();
+ do {
+ --it;
+ if (it->second == version) {
+ return *it;
+ }
+ if (it->second < version) {
+ break;
+ }
+ } while (it != search_it->second.begin());
+ it = --search_it->second.end();
+ LOG(ERROR) << " key:" << key << " no version:" << version
+ << " return max:" << it->second;
+ return *it;
+ }
+ return std::make_pair("", 0);
+}
+
+std::map<std::string, std::pair<std::string, int>> MemoryDB::GetAllItems() {
+ std::map<std::string, std::pair<std::string, int>> resp;
+
+ for (const auto& it : kv_map_with_v_) {
+ resp.insert(std::make_pair(it.first, it.second.back()));
+ }
+ return resp;
+}
+
+std::map<std::string, std::pair<std::string, int>> MemoryDB::GetKeyRange(
+ const std::string& min_key, const std::string& max_key) {
+ LOG(ERROR) << "min key:" << min_key << " max key:" << max_key;
+ std::map<std::string, std::pair<std::string, int>> resp;
+ for (const auto& it : kv_map_with_v_) {
+ if (it.first >= min_key && it.first <= max_key) {
+ resp.insert(std::make_pair(it.first, it.second.back()));
+ }
+ }
+ return resp;
+}
+
+std::vector<std::pair<std::string, int>> MemoryDB::GetHistory(
+ const std::string& key, int min_version, int max_version) {
+ std::vector<std::pair<std::string, int>> resp;
+ auto search_it = kv_map_with_v_.find(key);
+ if (search_it == kv_map_with_v_.end()) {
+ return resp;
+ }
+
+ auto it = search_it->second.end();
+ do {
+ --it;
+ if (it->second < min_version) {
+ break;
+ }
+ if (it->second <= max_version) {
+ resp.push_back(*it);
+ }
+ } while (it != search_it->second.begin());
+ return resp;
+}
+
+std::vector<std::pair<std::string, int>> MemoryDB::GetTopHistory(
+ const std::string& key, int top_number) {
+ std::vector<std::pair<std::string, int>> resp;
+ auto search_it = kv_map_with_v_.find(key);
+ if (search_it == kv_map_with_v_.end()) {
+ return resp;
+ }
+
+ auto it = search_it->second.end();
+ do {
+ --it;
+ resp.push_back(*it);
+ if (resp.size() >= static_cast<size_t>(top_number)) {
+ break;
+ }
+ } while (it != search_it->second.begin());
+ return resp;
+}
+
+} // namespace storage
+} // namespace resdb
diff --git a/chain/storage/memory_db.h b/chain/storage/memory_db.h
new file mode 100644
index 00000000..372f4647
--- /dev/null
+++ b/chain/storage/memory_db.h
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include <list>
+#include <map>
+#include <memory>
+#include <unordered_map>
+
+#include "chain/storage/storage.h"
+
+namespace resdb {
+namespace storage {
+
+// Key Value Storage supporting two types of interfaces:
+// Non-version:
+// It provides set and get function to set a value to a specific key
+// Values will be set directly.
+// Version:
+// It provides set and get function to set a value to a specific key
+// with a version.
+// The version inside setting function is to support OCC verification.
+// The version value should be obtained before setting
+// and returned back when setting a new value. If the version is not
+// the same as the old one, return failure.
+// If the value of a specific version does not exist or providing
+// version 0 as parameter when accessing get
+// it returns the current value along its version.
+//
+// Note: Only one type of interface are allowed to be used.
+//
+
+std::unique_ptr<Storage> NewMemoryDB();
+
+class MemoryDB : public Storage {
+ public:
+ MemoryDB();
+
+ int SetValue(const std::string& key, const std::string& value);
+ std::string GetValue(const std::string& key);
+
+ std::string GetAllValues() override;
+ std::string GetRange(const std::string& min_key,
+ const std::string& max_key) override;
+
+ int SetValueWithVersion(const std::string& key, const std::string& value,
+ int version) override;
+ std::pair<std::string, int> GetValueWithVersion(const std::string& key,
+ int version) override;
+
+ // Return a map of <key, <value, version>>
+ std::map<std::string, std::pair<std::string, int>> GetAllItems() override;
+ std::map<std::string, std::pair<std::string, int>> GetKeyRange(
+ const std::string& min_key, const std::string& max_key) override;
+
+ // Return a list of <value, version>
+ std::vector<std::pair<std::string, int>> GetHistory(const std::string& key,
+ int min_version,
+ int max_version) override;
+
+ std::vector<std::pair<std::string, int>> GetTopHistory(const std::string& key,
+ int number) override;
+
+ private:
+ std::unordered_map<std::string, std::string> kv_map_;
+ std::unordered_map<std::string, std::list<std::pair<std::string, int>>>
+ kv_map_with_v_;
+};
+
+} // namespace storage
+} // namespace resdb
diff --git a/chain/storage/mock_storage.h b/chain/storage/mock_storage.h
new file mode 100644
index 00000000..963d92bb
--- /dev/null
+++ b/chain/storage/mock_storage.h
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include "chain/storage/storage.h"
+#include "gmock/gmock.h"
+
+namespace resdb {
+
+class MockStorage : public Storage {
+ public:
+ MOCK_METHOD(int, SetValue, (const std::string& key, const std::string& value),
+ (override));
+ MOCK_METHOD(std::string, GetValue, (const std::string& key), (override));
+ MOCK_METHOD(std::string, GetAllValues, (), (override));
+ MOCK_METHOD(std::string, GetRange, (const std::string&, const std::string&),
+ (override));
+
+ MOCK_METHOD(int, SetValueWithVersion,
+ (const std::string& key, const std::string& value, int version),
+ (override));
+
+ using ValueType = std::pair<std::string, int>;
+ using ItemsType = std::map<std::string, ValueType>;
+ using ValuesType = std::vector<ValueType>;
+
+ MOCK_METHOD(ValueType, GetValueWithVersion,
+ (const std::string& key, int version), (override));
+ MOCK_METHOD(ItemsType, GetAllItems, (), (override));
+ MOCK_METHOD(ItemsType, GetKeyRange, (const std::string&, const std::string&),
+ (override));
+ MOCK_METHOD(ValuesType, GetHistory, (const std::string&, int, int),
+ (override));
+ MOCK_METHOD(ValuesType, GetTopHistory, (const std::string&, int), (override));
+
+ MOCK_METHOD(bool, Flush, (), (override));
+};
+
+} // namespace resdb
diff --git a/chain/storage/proto/BUILD b/chain/storage/proto/BUILD
new file mode 100644
index 00000000..1dea24a1
--- /dev/null
+++ b/chain/storage/proto/BUILD
@@ -0,0 +1,36 @@
+package(default_visibility = ["//visibility:public"])
+
+load("@rules_cc//cc:defs.bzl", "cc_proto_library")
+load("@rules_proto//proto:defs.bzl", "proto_library")
+
+proto_library(
+ name = "kv_proto",
+ srcs = ["kv.proto"],
+ visibility = ["//chain/storage:__subpackages__"],
+)
+
+cc_proto_library(
+ name = "kv_cc_proto",
+ visibility = ["//chain/storage:__subpackages__"],
+ deps = [":kv_proto"],
+)
+
+proto_library(
+ name = "leveldb_config_proto",
+ srcs = ["leveldb_config.proto"],
+)
+
+cc_proto_library(
+ name = "leveldb_config_cc_proto",
+ deps = [":leveldb_config_proto"],
+)
+
+proto_library(
+ name = "rocksdb_config_proto",
+ srcs = ["rocksdb_config.proto"],
+)
+
+cc_proto_library(
+ name = "rocksdb_config_cc_proto",
+ deps = [":rocksdb_config_proto"],
+)
diff --git a/chain/storage/proto/kv.proto b/chain/storage/proto/kv.proto
new file mode 100644
index 00000000..bb2e8945
--- /dev/null
+++ b/chain/storage/proto/kv.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+
+package resdb.storage;
+
+message Value {
+ bytes value = 1;
+ int32 version = 2;
+}
+
+message ValueHistory {
+ repeated Value value = 1;
+}
+
diff --git a/chain/storage/proto/leveldb_config.proto b/chain/storage/proto/leveldb_config.proto
new file mode 100644
index 00000000..572b4a08
--- /dev/null
+++ b/chain/storage/proto/leveldb_config.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+package resdb.storage;
+
+message LevelDBInfo {
+ uint32 write_buffer_size_mb = 2;
+ uint32 write_batch_size = 3;
+ string path = 4;
+}
diff --git a/chain/storage/proto/rocksdb_config.proto b/chain/storage/proto/rocksdb_config.proto
new file mode 100644
index 00000000..a1a45396
--- /dev/null
+++ b/chain/storage/proto/rocksdb_config.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+package resdb.storage;
+
+message RocksDBInfo {
+ uint32 num_threads = 2;
+ uint32 write_buffer_size_mb = 3;
+ uint32 write_batch_size = 4;
+ string path = 5;
+}
+
diff --git a/chain/storage/rocksdb.cpp b/chain/storage/rocksdb.cpp
new file mode 100644
index 00000000..86efd3e3
--- /dev/null
+++ b/chain/storage/rocksdb.cpp
@@ -0,0 +1,291 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "chain/storage/rocksdb.h"
+
+#include <glog/logging.h>
+
+#include "chain/storage/proto/kv.pb.h"
+
+namespace resdb {
+namespace storage {
+
+std::unique_ptr<Storage> NewResRocksDB(const std::string& path,
+ std::optional<RocksDBInfo> config) {
+ if (config == std::nullopt) {
+ config = RocksDBInfo();
+ }
+ (*config).set_path(path);
+ return std::make_unique<ResRocksDB>(config);
+}
+
+std::unique_ptr<Storage> NewResRocksDB(std::optional<RocksDBInfo> config) {
+ return std::make_unique<ResRocksDB>(config);
+}
+
+ResRocksDB::ResRocksDB(std::optional<RocksDBInfo> config) {
+ std::string path = "/tmp/nexres-rocksdb";
+ if (config.has_value()) {
+ num_threads_ = (*config).num_threads();
+ write_buffer_size_ = (*config).write_buffer_size_mb() << 20;
+ write_batch_size_ = (*config).write_batch_size();
+ if ((*config).path() != "") {
+ LOG(ERROR) << "Custom path for RocksDB provided in config: "
+ << (*config).path();
+ path = (*config).path();
+ }
+ }
+ CreateDB(path);
+}
+
+void ResRocksDB::CreateDB(const std::string& path) {
+ rocksdb::Options options;
+ options.create_if_missing = true;
+ if (num_threads_ > 1) options.IncreaseParallelism(num_threads_);
+ options.OptimizeLevelStyleCompaction();
+ options.write_buffer_size = write_buffer_size_;
+
+ rocksdb::DB* db = nullptr;
+ rocksdb::Status status = rocksdb::DB::Open(options, path, &db);
+ if (status.ok()) {
+ db_ = std::unique_ptr<rocksdb::DB>(db);
+ LOG(ERROR) << "Successfully opened RocksDB in path: " << path;
+ } else {
+ LOG(ERROR) << "RocksDB status fail";
+ }
+ assert(status.ok());
+ LOG(ERROR) << "Successfully opened RocksDB";
+}
+
+ResRocksDB::~ResRocksDB() {
+ if (db_) {
+ db_.reset();
+ }
+}
+
+int ResRocksDB::SetValue(const std::string& key, const std::string& value) {
+ batch_.Put(key, value);
+
+ if (batch_.Count() >= write_batch_size_) {
+ rocksdb::Status status = db_->Write(rocksdb::WriteOptions(), &batch_);
+ if (status.ok()) {
+ batch_.Clear();
+ } else {
+ LOG(ERROR) << "write value fail:" << status.ToString();
+ return -1;
+ }
+ }
+ return 0;
+}
+
+std::string ResRocksDB::GetValue(const std::string& key) {
+ std::string value = "";
+ rocksdb::Status status = db_->Get(rocksdb::ReadOptions(), key, &value);
+ if (status.ok()) {
+ return value;
+ } else {
+ return "";
+ }
+}
+
+std::string ResRocksDB::GetAllValues(void) {
+ std::string values = "[";
+ rocksdb::Iterator* itr = db_->NewIterator(rocksdb::ReadOptions());
+ bool first_iteration = true;
+ for (itr->SeekToFirst(); itr->Valid(); itr->Next()) {
+ if (!first_iteration) values.append(",");
+ first_iteration = false;
+ values.append(itr->value().ToString());
+ }
+ values.append("]");
+
+ delete itr;
+ return values;
+}
+
+std::string ResRocksDB::GetRange(const std::string& min_key,
+ const std::string& max_key) {
+ std::string values = "[";
+ rocksdb::Iterator* itr = db_->NewIterator(rocksdb::ReadOptions());
+ bool first_iteration = true;
+ for (itr->Seek(min_key); itr->Valid() && itr->key().ToString() <= max_key;
+ itr->Next()) {
+ if (!first_iteration) values.append(",");
+ first_iteration = false;
+ values.append(itr->value().ToString());
+ }
+ values.append("]");
+
+ delete itr;
+ return values;
+}
+
+bool ResRocksDB::Flush() {
+ rocksdb::Status status = db_->Write(rocksdb::WriteOptions(), &batch_);
+ if (status.ok()) {
+ batch_.Clear();
+ return true;
+ }
+ LOG(ERROR) << "write value fail:" << status.ToString();
+ return false;
+}
+int ResRocksDB::SetValueWithVersion(const std::string& key,
+ const std::string& value, int version) {
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return -2;
+ }
+
+ int last_v = 0;
+ if (history.value_size() > 0) {
+ last_v = history.value(history.value_size() - 1).version();
+ }
+
+ if (last_v != version) {
+ LOG(ERROR) << "version does not match:" << version
+ << " old version:" << last_v;
+ return -2;
+ }
+
+ Value* new_value = history.add_value();
+ new_value->set_value(value);
+ new_value->set_version(version + 1);
+
+ history.SerializeToString(&value_str);
+ return SetValue(key, value_str);
+}
+
+std::pair<std::string, int> ResRocksDB::GetValueWithVersion(
+ const std::string& key, int version) {
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return std::make_pair("", 0);
+ }
+ if (history.value_size() == 0) {
+ return std::make_pair("", 0);
+ }
+ if (version > 0) {
+ for (int i = history.value_size() - 1; i >= 0; --i) {
+ if (history.value(i).version() == version) {
+ return std::make_pair(history.value(i).value(),
+ history.value(i).version());
+ }
+ if (history.value(i).version() < version) {
+ break;
+ }
+ }
+ }
+ int last_idx = history.value_size() - 1;
+ return std::make_pair(history.value(last_idx).value(),
+ history.value(last_idx).version());
+}
+
+// Return a map of <key, <value, version>>
+std::map<std::string, std::pair<std::string, int>> ResRocksDB::GetAllItems() {
+ std::map<std::string, std::pair<std::string, int>> resp;
+
+ rocksdb::Iterator* it = db_->NewIterator(rocksdb::ReadOptions());
+ for (it->SeekToFirst(); it->Valid(); it->Next()) {
+ ValueHistory history;
+ if (!history.ParseFromString(it->value().ToString()) ||
+ history.value_size() == 0) {
+ LOG(ERROR) << "old_value parse fail";
+ continue;
+ }
+ const Value& value = history.value(history.value_size() - 1);
+ resp.insert(std::make_pair(it->key().ToString(),
+ std::make_pair(value.value(), value.version())));
+ }
+ delete it;
+
+ return resp;
+}
+
+std::map<std::string, std::pair<std::string, int>> ResRocksDB::GetKeyRange(
+ const std::string& min_key, const std::string& max_key) {
+ std::map<std::string, std::pair<std::string, int>> resp;
+
+ rocksdb::Iterator* it = db_->NewIterator(rocksdb::ReadOptions());
+ for (it->Seek(min_key); it->Valid() && it->key().ToString() <= max_key;
+ it->Next()) {
+ ValueHistory history;
+ if (!history.ParseFromString(it->value().ToString()) ||
+ history.value_size() == 0) {
+ LOG(ERROR) << "old_value parse fail";
+ continue;
+ }
+ const Value& value = history.value(history.value_size() - 1);
+ resp.insert(std::make_pair(it->key().ToString(),
+ std::make_pair(value.value(), value.version())));
+ }
+ delete it;
+
+ return resp;
+}
+
+// Return a list of <value, version>
+std::vector<std::pair<std::string, int>> ResRocksDB::GetHistory(
+ const std::string& key, int min_version, int max_version) {
+ std::vector<std::pair<std::string, int>> resp;
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return resp;
+ }
+
+ for (int i = history.value_size() - 1; i >= 0; --i) {
+ if (history.value(i).version() < min_version) {
+ break;
+ }
+ if (history.value(i).version() <= max_version) {
+ resp.push_back(
+ std::make_pair(history.value(i).value(), history.value(i).version()));
+ }
+ }
+
+ return resp;
+}
+
+// Return a list of <value, version>
+std::vector<std::pair<std::string, int>> ResRocksDB::GetTopHistory(
+ const std::string& key, int top_number) {
+ std::vector<std::pair<std::string, int>> resp;
+ std::string value_str = GetValue(key);
+ ValueHistory history;
+ if (!history.ParseFromString(value_str)) {
+ LOG(ERROR) << "old_value parse fail";
+ return resp;
+ }
+
+ for (int i = history.value_size() - 1;
+ i >= 0 && resp.size() < static_cast<size_t>(top_number); --i) {
+ resp.push_back(
+ std::make_pair(history.value(i).value(), history.value(i).version()));
+ }
+
+ return resp;
+}
+
+} // namespace storage
+} // namespace resdb
diff --git a/chain/storage/rocksdb.h b/chain/storage/rocksdb.h
new file mode 100644
index 00000000..c3e35564
--- /dev/null
+++ b/chain/storage/rocksdb.h
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <optional>
+#include <string>
+
+#include "chain/storage/proto/rocksdb_config.pb.h"
+#include "chain/storage/storage.h"
+#include "rocksdb/db.h"
+#include "rocksdb/write_batch.h"
+
+namespace resdb {
+namespace storage {
+
+std::unique_ptr<Storage> NewResRocksDB(
+ const std::string& path, std::optional<RocksDBInfo> config = std::nullopt);
+std::unique_ptr<Storage> NewResRocksDB(
+ std::optional<RocksDBInfo> config = std::nullopt);
+
+class ResRocksDB : public Storage {
+ public:
+ ResRocksDB(std::optional<RocksDBInfo> config_data = std::nullopt);
+ virtual ~ResRocksDB();
+ int SetValue(const std::string& key, const std::string& value) override;
+ std::string GetValue(const std::string& key) override;
+ std::string GetAllValues(void) override;
+ std::string GetRange(const std::string& min_key,
+ const std::string& max_key) override;
+
+ int SetValueWithVersion(const std::string& key, const std::string& value,
+ int version) override;
+ std::pair<std::string, int> GetValueWithVersion(const std::string& key,
+ int version) override;
+
+ // Return a map of <key, <value, version>>
+ std::map<std::string, std::pair<std::string, int>> GetAllItems() override;
+ std::map<std::string, std::pair<std::string, int>> GetKeyRange(
+ const std::string& min_key, const std::string& max_key) override;
+
+ // Return a list of <value, version>
+ std::vector<std::pair<std::string, int>> GetHistory(const std::string& key,
+ int min_version,
+ int max_version) override;
+ std::vector<std::pair<std::string, int>> GetTopHistory(
+ const std::string& key, int top_number) override;
+
+ bool Flush() override;
+
+ private:
+ void CreateDB(const std::string& path);
+
+ private:
+ std::unique_ptr<::rocksdb::DB> db_ = nullptr;
+ ::rocksdb::WriteBatch batch_;
+ unsigned int num_threads_ = 1;
+ unsigned int write_buffer_size_ = 64 << 20;
+ unsigned int write_batch_size_ = 1;
+};
+
+} // namespace storage
+} // namespace resdb
diff --git a/chain/storage/setting/BUILD b/chain/storage/setting/BUILD
new file mode 100644
index 00000000..e7f33e35
--- /dev/null
+++ b/chain/storage/setting/BUILD
@@ -0,0 +1,31 @@
+package(default_visibility = ["//visibility:public"])
+
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+
+bool_flag(
+ name = "enable_leveldb",
+ build_setting_default = False,
+ visibility = ["//visibility:public"],
+)
+
+bool_flag(
+ name = "enable_rocksdb",
+ build_setting_default = False,
+ visibility = ["//visibility:public"],
+)
+
+config_setting(
+ name = "enable_leveldb_setting",
+ values = {
+ "define": "enable_leveldb=True",
+ },
+ visibility = ["//visibility:public"],
+)
+
+config_setting(
+ name = "enable_rocksdb_setting",
+ values = {
+ "define": "enable_rocksdb=True",
+ },
+ visibility = ["//visibility:public"],
+)
diff --git a/chain/storage/storage.h b/chain/storage/storage.h
new file mode 100644
index 00000000..76e352de
--- /dev/null
+++ b/chain/storage/storage.h
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#include <map>
+#include <string>
+#include <vector>
+
+namespace resdb {
+
+class Storage {
+ public:
+ Storage() = default;
+ virtual ~Storage() = default;
+
+ virtual int SetValue(const std::string& key, const std::string& value) = 0;
+ virtual std::string GetValue(const std::string& key) = 0;
+ virtual std::string GetAllValues() = 0;
+ virtual std::string GetRange(const std::string& min_key,
+ const std::string& max_key) = 0;
+
+ virtual int SetValueWithVersion(const std::string& key,
+ const std::string& value, int version) = 0;
+ virtual std::pair<std::string, int> GetValueWithVersion(
+ const std::string& key, int version) = 0;
+
+ // Return a map of <key, <value, version>>
+ virtual std::map<std::string, std::pair<std::string, int>> GetAllItems() = 0;
+ virtual std::map<std::string, std::pair<std::string, int>> GetKeyRange(
+ const std::string& min_key, const std::string& max_key) = 0;
+
+ // Return a list of <value, version> from a key
+ // The version list is sorted by the version value in descending order
+ virtual std::vector<std::pair<std::string, int>> GetHistory(
+ const std::string& key, int min_version, int max_version) = 0;
+
+ virtual std::vector<std::pair<std::string, int>> GetTopHistory(
+ const std::string& key, int number) = 0;
+
+ virtual bool Flush() { return true; };
+};
+
+} // namespace resdb
diff --git a/common/BUILD b/common/BUILD
new file mode 100644
index 00000000..62d32413
--- /dev/null
+++ b/common/BUILD
@@ -0,0 +1,60 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "absl",
+ deps = [
+ "@com_google_absl//absl/status",
+ "@com_google_absl//absl/status:statusor",
+ ],
+)
+
+cc_library(
+ name = "asio",
+ deps = [
+ "@boost//:asio",
+ ],
+)
+
+cc_library(
+ name = "boost_lockfree",
+ deps = [
+ "@boost//:lockfree",
+ ],
+)
+
+cc_library(
+ name = "glog",
+ deps = [
+ "@com_github_google_glog//:glog",
+ ],
+)
+
+cc_library(
+ name = "pybind",
+ deps = [
+ "@pybind11",
+ ],
+)
+
+cc_library(
+ name = "json",
+ deps = [
+ "@nlohmann_json//:json",
+ ],
+)
+
+cc_library(
+ name = "boost_comm",
+ deps = [
+ "@boost//:algorithm",
+ "@boost//:optional",
+ ],
+)
+
+cc_library(
+ name = "comm",
+ deps = [
+ ":absl",
+ ":glog",
+ ],
+)
diff --git a/common/crypto/BUILD b/common/crypto/BUILD
new file mode 100644
index 00000000..1b7dbebe
--- /dev/null
+++ b/common/crypto/BUILD
@@ -0,0 +1,85 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "key_generator",
+ srcs = ["key_generator.cpp"],
+ hdrs = ["key_generator.h"],
+ deps = [
+ "//:cryptopp_lib",
+ "//common:comm",
+ "//common/proto:signature_info_cc_proto",
+ ],
+)
+
+cc_library(
+ name = "hash",
+ srcs = ["hash.cpp"],
+ hdrs = ["hash.h"],
+ deps = [
+ "//:cryptopp_lib",
+ "//common:comm",
+ ],
+)
+
+cc_test(
+ name = "hash_test",
+ srcs = ["hash_test.cpp"],
+ deps = [
+ ":hash",
+ "//common/test:test_main",
+ ],
+)
+
+cc_library(
+ name = "signature_utils",
+ srcs = ["signature_utils.cpp"],
+ hdrs = ["signature_utils.h"],
+ deps = [
+ "//:cryptopp_lib",
+ "//common:comm",
+ "//common/proto:signature_info_cc_proto",
+ ],
+)
+
+cc_library(
+ name = "signature_verifier_interface",
+ srcs = ["signature_verifier_interface.cpp"],
+ hdrs = ["signature_verifier_interface.h"],
+ deps = [
+ "//common:comm",
+ "//common/proto:signature_info_cc_proto",
+ ],
+)
+
+cc_library(
+ name = "signature_verifier",
+ srcs = ["signature_verifier.cpp"],
+ hdrs = ["signature_verifier.h"],
+ deps = [
+ ":signature_utils",
+ ":signature_verifier_interface",
+ "//:cryptopp_lib",
+ "//common:comm",
+ "//common/proto:signature_info_cc_proto",
+ ],
+)
+
+cc_library(
+ name = "mock_signature_verifier",
+ testonly = True,
+ hdrs = ["mock_signature_verifier.h"],
+ deps = [
+ ":signature_verifier",
+ ],
+)
+
+cc_test(
+ name = "signature_verifier_test",
+ srcs = ["signature_verifier_test.cpp"],
+ deps = [
+ ":key_generator",
+ ":signature_verifier",
+ "//:cryptopp_lib",
+ "//common/test:test_main",
+ ],
+)
diff --git a/common/crypto/hash.cpp b/common/crypto/hash.cpp
new file mode 100644
index 00000000..e16ed032
--- /dev/null
+++ b/common/crypto/hash.cpp
@@ -0,0 +1,54 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/crypto/hash.h"
+
+#include <cryptopp/ripemd.h>
+#include <cryptopp/sha.h>
+#include <glog/logging.h>
+
+namespace resdb {
+namespace utils {
+// Funtion to calculate hash of a string.
+std::string CalculateSHA256Hash(const std::string& str) {
+ CryptoPP::byte const* pData = (CryptoPP::byte*)str.data();
+ unsigned int nDataLen = str.size();
+ CryptoPP::byte aDigest[CryptoPP::SHA256::DIGESTSIZE];
+
+ CryptoPP::SHA256().CalculateDigest(aDigest, pData, nDataLen);
+ return std::string((char*)aDigest, CryptoPP::SHA256::DIGESTSIZE);
+}
+
+std::string CalculateRIPEMD160Hash(const std::string& str) {
+ CryptoPP::byte const* pData = (CryptoPP::byte*)str.data();
+ unsigned int nDataLen = str.size();
+ CryptoPP::byte aDigest[CryptoPP::RIPEMD160::DIGESTSIZE];
+
+ CryptoPP::RIPEMD160().CalculateDigest(aDigest, pData, nDataLen);
+ return std::string((char*)aDigest, CryptoPP::RIPEMD160::DIGESTSIZE);
+}
+
+} // namespace utils
+} // namespace resdb
diff --git a/common/crypto/hash.h b/common/crypto/hash.h
new file mode 100644
index 00000000..d65a1785
--- /dev/null
+++ b/common/crypto/hash.h
@@ -0,0 +1,37 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+
+#include <string>
+
+namespace resdb {
+namespace utils {
+
+std::string CalculateSHA256Hash(const std::string& str);
+std::string CalculateRIPEMD160Hash(const std::string& str);
+
+} // namespace utils
+} // namespace resdb
diff --git a/common/crypto/hash_test.cpp b/common/crypto/hash_test.cpp
new file mode 100644
index 00000000..efcf8203
--- /dev/null
+++ b/common/crypto/hash_test.cpp
@@ -0,0 +1,56 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/crypto/hash.h"
+
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include "common/test/test_macros.h"
+
+namespace resdb {
+namespace utils {
+namespace {
+
+using ::resdb::testing::EqualsProto;
+
+TEST(SignatureVerifyTest, CalculateSHA256) {
+ std::string expected_str =
+ "\x9F\x86\xD0\x81\x88L}e\x9A/"
+ "\xEA\xA0\xC5Z\xD0\x15\xA3\xBFO\x1B+\v\x82,\xD1]l\x15\xB0\xF0\n\b";
+ EXPECT_EQ(CalculateSHA256Hash("test"), expected_str);
+}
+
+TEST(SignatureVerifyTest, CalculateRIPEMD160) {
+ std::string expected_str =
+ "^R\xFE\xE4~k\a\x5"
+ "e\xF7"
+ "CrF\x8C\xDCi\x9D\xE8\x91\a";
+ EXPECT_EQ(CalculateRIPEMD160Hash("test"), expected_str);
+}
+
+} // namespace
+} // namespace utils
+} // namespace resdb
diff --git a/common/crypto/key_generator.cpp b/common/crypto/key_generator.cpp
new file mode 100644
index 00000000..fd1d33f9
--- /dev/null
+++ b/common/crypto/key_generator.cpp
@@ -0,0 +1,162 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/crypto/key_generator.h"
+
+#include <cryptopp/aes.h>
+#include <cryptopp/cmac.h>
+#include <cryptopp/dsa.h>
+#include <cryptopp/eccrypto.h>
+#include <cryptopp/filters.h>
+#include <cryptopp/hex.h>
+#include <cryptopp/osrng.h>
+#include <cryptopp/pssr.h>
+#include <cryptopp/rsa.h>
+#include <cryptopp/sha.h>
+#include <cryptopp/whrlpool.h>
+#include <cryptopp/xed25519.h>
+#include <glog/logging.h>
+
+//#include <cryptopp/modes.h>
+//#include <iomanip>
+
+namespace resdb {
+
+namespace {
+
+//==============================================================================
+// Return a KeyPairHex for each node. This function is used by the nodes to
+// obtain their keyPair
+SecretKey RsaGenerateHexKeyPair(unsigned int key_size) {
+ SecretKey key_pair;
+ // PGP Random Pool-like generator
+ CryptoPP::AutoSeededRandomPool rng;
+
+ // generate keys
+ CryptoPP::RSA::PrivateKey private_key;
+ private_key.GenerateRandomWithKeySize(rng, key_size);
+ CryptoPP::RSA::PublicKey public_key(private_key);
+
+ // save keys
+ public_key.Save(CryptoPP::HexEncoder(
+ new CryptoPP::StringSink(*key_pair.mutable_public_key()))
+ .Ref());
+ private_key.Save(CryptoPP::HexEncoder(new CryptoPP::StringSink(
+ *key_pair.mutable_private_key()))
+ .Ref());
+
+ return key_pair;
+}
+
+// Initialize the signer and the keys for ED25519
+SecretKey ED25519GenerateKeys() {
+ CryptoPP::ed25519::Signer signer;
+ SecretKey key_pair;
+ CryptoPP::AutoSeededRandomPool prng;
+ // Initilize signer;
+ signer.AccessPrivateKey().GenerateRandom(prng);
+
+ const CryptoPP::ed25519PrivateKey &private_key =
+ dynamic_cast<const CryptoPP::ed25519PrivateKey &>(signer.GetPrivateKey());
+
+ key_pair.mutable_private_key()->assign(
+ (char *)private_key.GetPrivateKeyBytePtr(),
+ CryptoPP::ed25519PrivateKey::SECRET_KEYLENGTH);
+ key_pair.mutable_public_key()->assign(
+ (char *)private_key.GetPublicKeyBytePtr(),
+ CryptoPP::ed25519PrivateKey::PUBLIC_KEYLENGTH);
+ return key_pair;
+}
+
+// CMAC-AES key generator
+// Return a keyPairHex where just the priv key is set
+SecretKey CmacGenerateHexKey(unsigned int key_size) {
+ SecretKey key_pair;
+ std::string private_key;
+ CryptoPP::AutoSeededRandomPool prng;
+ // int keySize = 16 ; // AES::DEFAULT_KEYLENGTH
+ CryptoPP::SecByteBlock key(key_size);
+ prng.GenerateBlock(
+ key.data(), key.size()); // Key is a SecByteBlock that contains the key.
+
+ CryptoPP::StringSource ss(key.data(), key.size(), true,
+ new CryptoPP::HexEncoder(new CryptoPP::StringSink(
+ private_key)) // HexEncoder
+ ); // StringSource
+ key_pair.set_private_key(private_key);
+ key_pair.set_public_key(private_key);
+ return key_pair;
+}
+
+SecretKey ECDSAGenerateKeys() {
+ CryptoPP::AutoSeededRandomPool prng;
+ CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::PrivateKey privateKey;
+ CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> params(
+ CryptoPP::ASN1::secp256k1());
+ privateKey.Initialize(prng, params);
+
+ CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::PublicKey publicKey;
+ privateKey.MakePublicKey(publicKey);
+
+ SecretKey key_pair;
+
+ // save keys
+ publicKey.Save(CryptoPP::HexEncoder(
+ new CryptoPP::StringSink(*key_pair.mutable_public_key()))
+ .Ref());
+ privateKey.Save(CryptoPP::HexEncoder(
+ new CryptoPP::StringSink(*key_pair.mutable_private_key()))
+ .Ref());
+ return key_pair;
+}
+
+} // namespace
+
+SecretKey KeyGenerator::GeneratorKeys(SignatureInfo::HashType type) {
+ SecretKey key;
+ switch (type) {
+ case SignatureInfo::RSA:
+ key = RsaGenerateHexKeyPair(3072);
+ break;
+ case SignatureInfo::ED25519: {
+ key = ED25519GenerateKeys();
+ break;
+ }
+ case SignatureInfo::CMAC_AES: {
+ key = CmacGenerateHexKey(16);
+ break;
+ }
+ case SignatureInfo::ECDSA: {
+ key = ECDSAGenerateKeys();
+ break;
+ }
+ default:
+ break;
+ }
+ key.set_hash_type(type);
+ return key;
+}
+
+} // namespace resdb
diff --git a/common/crypto/key_generator.h b/common/crypto/key_generator.h
new file mode 100644
index 00000000..ff3b6bd8
--- /dev/null
+++ b/common/crypto/key_generator.h
@@ -0,0 +1,37 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+
+#include "common/proto/signature_info.pb.h"
+
+namespace resdb {
+
+class KeyGenerator {
+ public:
+ static SecretKey GeneratorKeys(SignatureInfo::HashType type);
+};
+
+} // namespace resdb
diff --git a/common/crypto/mock_signature_verifier.h b/common/crypto/mock_signature_verifier.h
new file mode 100644
index 00000000..7967efa3
--- /dev/null
+++ b/common/crypto/mock_signature_verifier.h
@@ -0,0 +1,41 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+
+#include "common/crypto/signature_verifier.h"
+
+namespace resdb {
+
+class MockSignatureVerifier : public SignatureVerifier {
+ public:
+ MockSignatureVerifier() : SignatureVerifier(KeyInfo(), CertificateInfo()) {}
+ MOCK_METHOD(absl::StatusOr<SignatureInfo>, SignMessage, (const std::string&),
+ (override));
+ MOCK_METHOD(bool, VerifyMessage,
+ (const std::string&, const SignatureInfo& sign), (override));
+};
+
+} // namespace resdb
diff --git a/common/crypto/signature_utils.cpp b/common/crypto/signature_utils.cpp
new file mode 100644
index 00000000..ef386307
--- /dev/null
+++ b/common/crypto/signature_utils.cpp
@@ -0,0 +1,153 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/crypto/signature_utils.h"
+
+#include <cryptopp/eccrypto.h>
+#include <cryptopp/hex.h>
+#include <cryptopp/osrng.h>
+#include <cryptopp/pssr.h>
+#include <cryptopp/rsa.h>
+#include <cryptopp/whrlpool.h>
+#include <glog/logging.h>
+
+namespace resdb {
+namespace utils {
+
+bool RsaVerifyString(const std::string& message, const std::string& public_key,
+ const std::string& signature) {
+ try {
+ // decode and load public key (using pipeline)
+ CryptoPP::RSA::PublicKey rsa_public_key;
+ rsa_public_key.Load(
+ CryptoPP::StringSource(public_key, true, new CryptoPP::HexDecoder())
+ .Ref());
+
+ // decode signature
+ std::string decoded_signature;
+ CryptoPP::StringSource ss(
+ signature, true,
+ new CryptoPP::HexDecoder(new CryptoPP::StringSink(decoded_signature)));
+
+ // verify message
+ bool result = false;
+ CryptoPP::RSASS<CryptoPP::PSSR, CryptoPP::Whirlpool>::Verifier verifier(
+ rsa_public_key);
+ CryptoPP::StringSource ss2(
+ decoded_signature + message, true,
+ new CryptoPP::SignatureVerificationFilter(
+ verifier,
+ new CryptoPP::ArraySink((CryptoPP::byte*)&result, sizeof(result))));
+
+ return result;
+ } catch (...) {
+ LOG(ERROR) << "key not valid";
+ return false;
+ }
+}
+
+bool ECDSAVerifyString(const std::string& message,
+ const std::string& public_key,
+ const std::string& signature) {
+ std::string decoded;
+ std::string output;
+ CryptoPP::StringSource(
+ signature, true,
+ new CryptoPP::HexDecoder(new CryptoPP::StringSink(decoded)) // StringSink
+ ); // StringSource
+
+ CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::PublicKey dsa_public_key;
+ dsa_public_key.Load(
+ CryptoPP::StringSource(public_key, true, new CryptoPP::HexDecoder())
+ .Ref());
+ CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::Verifier verifier(
+ dsa_public_key);
+
+ bool valid = true;
+ CryptoPP::StringSource(
+ decoded + message, true,
+ new CryptoPP::SignatureVerificationFilter(
+ verifier,
+ new CryptoPP::ArraySink((CryptoPP::byte*)&valid, sizeof(valid))));
+ if (!valid) {
+ LOG(ERROR) << "signature invalid. signature len:" << signature.size()
+ << " message len:" << message.size();
+ }
+ return valid;
+}
+
+std::string RsaSignString(const std::string& private_key,
+ const std::string& message) {
+ // decode and load private key (using pipeline)
+ CryptoPP::RSA::PrivateKey rsa_private_key;
+ rsa_private_key.Load(
+ CryptoPP::StringSource(private_key, true, new CryptoPP::HexDecoder())
+ .Ref());
+
+ // sign message
+ std::string signature;
+ CryptoPP::RSASS<CryptoPP::PSSR, CryptoPP::Whirlpool>::Signer signer(
+ rsa_private_key);
+ CryptoPP::AutoSeededRandomPool rng;
+ CryptoPP::StringSource ss(
+ message, true,
+ new CryptoPP::SignerFilter(
+ rng, signer,
+ new CryptoPP::HexEncoder(new CryptoPP::StringSink(signature))));
+ return signature;
+}
+
+std::string ECDSASignString(const std::string& private_key,
+ const std::string& message) {
+ try {
+ CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::PrivateKey privateKey;
+ privateKey.Load(
+ CryptoPP::StringSource(private_key, true, new CryptoPP::HexDecoder())
+ .Ref());
+ CryptoPP::AutoSeededRandomPool prng;
+ std::string signature;
+
+ CryptoPP::StringSource ss1(
+ message, true /*pump all*/,
+ new CryptoPP::SignerFilter(
+ prng,
+ CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::Signer(
+ privateKey),
+ new CryptoPP::StringSink(signature)));
+
+ std::string output;
+ CryptoPP::StringSource(signature, true,
+ new CryptoPP::HexEncoder(
+ new CryptoPP::StringSink(output)) // HexEncoder
+ ); // StringSource
+ return output;
+ } catch (...) {
+ LOG(ERROR) << "sign error";
+ return "";
+ }
+}
+
+} // namespace utils
+} // namespace resdb
diff --git a/common/crypto/signature_utils.h b/common/crypto/signature_utils.h
new file mode 100644
index 00000000..666b0ab4
--- /dev/null
+++ b/common/crypto/signature_utils.h
@@ -0,0 +1,46 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+
+#include <string>
+
+namespace resdb {
+namespace utils {
+
+bool RsaVerifyString(const std::string& message, const std::string& public_key,
+ const std::string& signature);
+bool ECDSAVerifyString(const std::string& message,
+ const std::string& public_key,
+ const std::string& signature);
+
+std::string RsaSignString(const std::string& private_key,
+ const std::string& message);
+
+std::string ECDSASignString(const std::string& private_key,
+ const std::string& message);
+
+} // namespace utils
+} // namespace resdb
diff --git a/common/crypto/signature_verifier.cpp b/common/crypto/signature_verifier.cpp
new file mode 100644
index 00000000..29f50b35
--- /dev/null
+++ b/common/crypto/signature_verifier.cpp
@@ -0,0 +1,285 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/crypto/signature_verifier.h"
+
+#include <cryptopp/aes.h>
+#include <cryptopp/cmac.h>
+#include <cryptopp/dsa.h>
+#include <cryptopp/eccrypto.h>
+#include <cryptopp/filters.h>
+#include <cryptopp/hex.h>
+#include <cryptopp/osrng.h>
+#include <cryptopp/pssr.h>
+#include <cryptopp/rsa.h>
+#include <cryptopp/sha.h>
+#include <cryptopp/whrlpool.h>
+#include <glog/logging.h>
+
+#include "common/crypto/signature_utils.h"
+
+namespace resdb {
+
+namespace {
+
+// ================== for verify ====================================
+bool ED25519verifyString(const std::string& message,
+ const std::string& public_key,
+ const std::string& signature) {
+ CryptoPP::byte byteKey[CryptoPP::ed25519PrivateKey::PUBLIC_KEYLENGTH];
+ if (public_key.size() != CryptoPP::ed25519PrivateKey::PUBLIC_KEYLENGTH) {
+ LOG(ERROR) << "public key len invalid:" << public_key.size();
+ return false;
+ }
+ memcpy(byteKey, public_key.c_str(), public_key.size());
+ auto verifier = CryptoPP::ed25519::Verifier(byteKey);
+
+ bool valid = true;
+ CryptoPP::StringSource(
+ signature + message, true,
+ new CryptoPP::SignatureVerificationFilter(
+ verifier,
+ new CryptoPP::ArraySink((CryptoPP::byte*)&valid, sizeof(valid))));
+ if (!valid) {
+ LOG(ERROR) << "signature invalid. signature len:" << signature.size()
+ << " message len:" << message.size();
+ }
+ return valid;
+}
+
+bool CmacVerifyString(const std::string& message, const std::string& public_key,
+ const std::string& signature) {
+ bool res = false;
+ // KEY TRANSFORMATION
+ // https://stackoverflow.com/questions/26145776/string-to-secbyteblock-conversion
+ CryptoPP::SecByteBlock privKey((const unsigned char*)(public_key.data()),
+ public_key.size());
+ CryptoPP::CMAC<CryptoPP::AES> cmac(privKey.data(), privKey.size());
+ const int flags = CryptoPP::HashVerificationFilter::HASH_AT_END |
+ CryptoPP::HashVerificationFilter::PUT_RESULT;
+
+ // MESSAGE VERIFICATION
+ CryptoPP::StringSource ss3(
+ message + signature, true,
+ new CryptoPP::HashVerificationFilter(
+ cmac, new CryptoPP::ArraySink((CryptoPP::byte*)&res, sizeof(res)),
+ flags)); // StringSource
+ return res;
+}
+
+// ================== for sign ====================================
+
+std::string ED25519signString(const std::string& message,
+ CryptoPP::ed25519::Signer* signer) {
+ CryptoPP::AutoSeededRandomPool prng;
+ std::string signature;
+ CryptoPP::StringSource(
+ message, true,
+ new CryptoPP::SignerFilter(CryptoPP::NullRNG(), *signer,
+ new CryptoPP::StringSink(signature)));
+ return signature;
+}
+
+// CMAC-AES Signature generator
+// Return a token, mac, to verify the a message.
+std::string CmacSignString(const std::string& private_key,
+ const std::string& message) {
+ std::string mac = "";
+
+ // KEY TRANSFORMATION.
+ // https://stackoverflow.com/questions/26145776/string-to-secbyteblock-conversion
+
+ CryptoPP::SecByteBlock mac_private_key(
+ (const unsigned char*)(private_key.data()), private_key.size());
+
+ CryptoPP::CMAC<CryptoPP::AES> cmac(mac_private_key.data(),
+ mac_private_key.size());
+
+ CryptoPP::StringSource ss1(
+ message, true,
+ new CryptoPP::HashFilter(cmac, new CryptoPP::StringSink(mac)));
+ return mac;
+}
+
+} // namespace
+
+SignatureVerifier::SignatureVerifier(const KeyInfo& private_key,
+ const CertificateInfo& certificate_info) {
+ private_key_ = private_key;
+ if (private_key_.key().empty()) {
+ LOG(ERROR) << "private invalid";
+ }
+
+ node_id_ = certificate_info.node_id();
+ admin_public_key_ = certificate_info.admin_public_key();
+ AddPublicKey(certificate_info.public_key(), false);
+ if (private_key_.hash_type() == SignatureInfo::ED25519) {
+ CryptoPP::byte byteKey[CryptoPP::ed25519PrivateKey::SECRET_KEYLENGTH];
+ if (private_key_.key().size() !=
+ CryptoPP::ed25519PrivateKey::SECRET_KEYLENGTH) {
+ return;
+ }
+ memcpy(byteKey, private_key_.key().c_str(), private_key_.key().size());
+ signer_ = std::make_unique<CryptoPP::ed25519::Signer>(byteKey);
+ }
+}
+
+bool SignatureVerifier::AddPublicKey(const CertificateKey& public_key,
+ bool need_verify) {
+ std::unique_lock<std::shared_mutex> lk(mutex_);
+ if (need_verify &&
+ !VerifyKey(public_key.public_key_info(), public_key.certificate())) {
+ return false;
+ }
+ // LOG(ERROR) << "add public key from:"
+ // << public_key.public_key_info().node_id();
+ keys_[public_key.public_key_info().node_id()] = public_key;
+ return true;
+}
+
+absl::StatusOr<KeyInfo> SignatureVerifier::GetPublicKey(int64_t node_id) const {
+ std::shared_lock<std::shared_mutex> lk(mutex_);
+ auto it = keys_.find(node_id);
+ if (it == keys_.end()) {
+ return absl::InvalidArgumentError("Public key not exist.");
+ }
+ return it->second.public_key_info().key();
+}
+
+std::vector<CertificateKey> SignatureVerifier::GetAllPublicKeys() const {
+ std::shared_lock<std::shared_mutex> lk(mutex_);
+ std::vector<CertificateKey> keys;
+ for (auto key : keys_) {
+ keys.push_back(key.second);
+ }
+ return keys;
+}
+
+size_t SignatureVerifier::GetPublicKeysSize() const {
+ std::shared_lock<std::shared_mutex> lk(mutex_);
+ return keys_.size();
+}
+
+// Funtion to calculate hash of a string.
+std::string SignatureVerifier::CalculateHash(const std::string& str) {
+ CryptoPP::byte const* pData = (CryptoPP::byte*)str.data();
+ unsigned int nDataLen = str.size();
+ CryptoPP::byte aDigest[CryptoPP::SHA256::DIGESTSIZE];
+
+ CryptoPP::SHA256().CalculateDigest(aDigest, pData, nDataLen);
+ return std::string((char*)aDigest, CryptoPP::SHA256::DIGESTSIZE);
+}
+
+absl::StatusOr<SignatureInfo> SignatureVerifier::SignMessage(
+ const std::string& message) {
+ SignatureInfo info;
+ info.set_node_id(node_id_);
+ switch (private_key_.hash_type()) {
+ case SignatureInfo::RSA:
+ info.set_signature(utils::RsaSignString(private_key_.key(), message));
+ break;
+ case SignatureInfo::ED25519:
+ info.set_signature(ED25519signString(message, signer_.get()));
+ break;
+ case SignatureInfo::CMAC_AES:
+ info.set_signature(CmacSignString(private_key_.key(), message));
+ break;
+ case SignatureInfo::ECDSA:
+ info.set_signature(utils::ECDSASignString(private_key_.key(), message));
+ break;
+ default:
+ break;
+ }
+ return info;
+}
+
+bool SignatureVerifier::VerifyMessage(const google::protobuf::Message& message,
+ const SignatureInfo& sign) {
+ std::string str;
+ if (!message.SerializeToString(&str)) {
+ return false;
+ }
+ return VerifyMessage(str, sign);
+}
+
+bool SignatureVerifier::VerifyMessage(const std::string& message,
+ const SignatureInfo& info) {
+ if (info.signature().empty()) {
+ LOG(ERROR) << " signature is empty";
+ return false;
+ }
+ auto public_key = GetPublicKey(info.node_id());
+ if (!public_key.ok()) {
+ LOG(ERROR) << "key not found:" << info.node_id();
+ return false;
+ }
+ return VerifyMessage(message, *public_key, info.signature());
+}
+
+absl::StatusOr<SignatureInfo> SignatureVerifier::SignCertificateKeyInfo(
+ const CertificateKeyInfo& info) {
+ std::string str;
+ if (!info.SerializeToString(&str)) {
+ return absl::InvalidArgumentError("Serialize fail");
+ }
+ return SignatureVerifier::SignMessage(str);
+}
+
+bool SignatureVerifier::VerifyKey(const CertificateKeyInfo& info,
+ const SignatureInfo& sign) {
+ std::string str;
+ if (!info.SerializeToString(&str)) {
+ return false;
+ }
+ return VerifyMessage(str, admin_public_key_, sign.signature());
+}
+
+bool SignatureVerifier::VerifyMessage(const std::string& message,
+ const KeyInfo& public_key,
+ const std::string& signature) {
+ if (public_key.key().empty() || signature.empty()) {
+ LOG(ERROR) << "public is empty, size(" << public_key.key().size()
+ << ") or signature is empty, size(" << signature.size() << ")";
+ return false;
+ }
+ // LOG(ERROR) << "public key hash type:" << public_key.hash_type()
+ // << " key size:" << public_key.key().size()
+ // << " sig size:" << signature.size()
+ // << " msg size:" << message.size();
+ switch (public_key.hash_type()) {
+ case SignatureInfo::RSA:
+ return utils::RsaVerifyString(message, public_key.key(), signature);
+ case SignatureInfo::ED25519:
+ return ED25519verifyString(message, public_key.key(), signature);
+ case SignatureInfo::CMAC_AES:
+ return CmacVerifyString(message, public_key.key(), signature);
+ case SignatureInfo::ECDSA:
+ return utils::ECDSAVerifyString(message, public_key.key(), signature);
+ default:
+ return true;
+ }
+}
+
+} // namespace resdb
diff --git a/common/crypto/signature_verifier.h b/common/crypto/signature_verifier.h
new file mode 100644
index 00000000..db88321e
--- /dev/null
+++ b/common/crypto/signature_verifier.h
@@ -0,0 +1,89 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+
+#include <cryptopp/filters.h>
+#include <cryptopp/xed25519.h>
+
+#include <shared_mutex>
+#include <string>
+
+#include "absl/status/statusor.h"
+#include "common/crypto/signature_verifier_interface.h"
+#include "common/proto/signature_info.pb.h"
+
+namespace resdb {
+
+// SignatureVerifier used to sign signatures using private_key,
+// and verify signatures using the public keys of the senders identified
+// by their node_id.
+class SignatureVerifier : public SignatureVerifierInterface {
+ public:
+ SignatureVerifier(const KeyInfo& private_key,
+ const CertificateInfo& certificate_info);
+ virtual ~SignatureVerifier() = default;
+
+ // Set the public key that contains the public key, node id,
+ // and its certificate.
+ bool AddPublicKey(const CertificateKey& pub_key, bool need_verify = true);
+
+ // Get the public key of node id. KeyInfo contains the key and its hash type.
+ absl::StatusOr<KeyInfo> GetPublicKey(int64_t node_id) const;
+ // Get all the public keys.
+ std::vector<CertificateKey> GetAllPublicKeys() const;
+ // Get the number of public keys it contains.
+ size_t GetPublicKeysSize() const;
+
+ // Sign messages using the private key.
+ virtual absl::StatusOr<SignatureInfo> SignMessage(const std::string& message);
+ absl::StatusOr<SignatureInfo> SignCertificateKeyInfo(
+ const CertificateKeyInfo& info);
+
+ // Verify messages using the public key from the sender.
+ virtual bool VerifyMessage(const std::string& message,
+ const SignatureInfo& sign);
+ bool VerifyMessage(const google::protobuf::Message& message,
+ const SignatureInfo& sign);
+ bool VerifyKey(const CertificateKeyInfo& info, const SignatureInfo& sign);
+
+ static std::string CalculateHash(const std::string& str);
+
+ static bool VerifyMessage(const std::string& message,
+ const KeyInfo& public_key,
+ const std::string& signature);
+
+ private:
+ std::map<int64_t, CertificateKey> keys_;
+ // GUARDED_BY(mutex_); // public keys of nodes, including the public key and
+ // its encrpt type.
+ KeyInfo private_key_; // public-private keys of self.
+ KeyInfo admin_public_key_; // public key of admin.
+ int64_t node_id_; // id of current node.
+ std::unique_ptr<CryptoPP::ed25519::Signer> signer_;
+ mutable std::shared_mutex mutex_;
+};
+
+} // namespace resdb
diff --git a/common/crypto/signature_verifier_interface.cpp b/common/crypto/signature_verifier_interface.cpp
new file mode 100644
index 00000000..e680a279
--- /dev/null
+++ b/common/crypto/signature_verifier_interface.cpp
@@ -0,0 +1,35 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/crypto/signature_verifier_interface.h"
+
+namespace resdb {
+
+absl::StatusOr<SignatureInfo> SignatureVerifierInterface::SignMessage(
+ const std::string& message) {
+ return SignatureInfo();
+}
+
+} // namespace resdb
diff --git a/common/crypto/signature_verifier_interface.h b/common/crypto/signature_verifier_interface.h
new file mode 100644
index 00000000..09ca318b
--- /dev/null
+++ b/common/crypto/signature_verifier_interface.h
@@ -0,0 +1,43 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+
+#include "absl/status/statusor.h"
+#include "common/proto/signature_info.pb.h"
+
+namespace resdb {
+
+// SignatureVerifier base class, provide an interface for communication.
+class SignatureVerifierInterface {
+ public:
+ SignatureVerifierInterface() = default;
+ virtual ~SignatureVerifierInterface() = default;
+
+ // Sign messages using the private key.
+ virtual absl::StatusOr<SignatureInfo> SignMessage(const std::string& message);
+};
+
+} // namespace resdb
diff --git a/common/crypto/signature_verifier_test.cpp b/common/crypto/signature_verifier_test.cpp
new file mode 100644
index 00000000..fbb26d9b
--- /dev/null
+++ b/common/crypto/signature_verifier_test.cpp
@@ -0,0 +1,166 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/crypto/signature_verifier.h"
+
+#include <glog/logging.h>
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include "common/crypto/key_generator.h"
+#include "common/test/test_macros.h"
+
+namespace resdb {
+namespace {
+
+using ::resdb::testing::EqualsProto;
+
+TEST(SignatureVerifyTest, CalculateHash) {
+ std::string expected_str =
+ "\x9F\x86\xD0\x81\x88L}e\x9A/"
+ "\xEA\xA0\xC5Z\xD0\x15\xA3\xBFO\x1B+\v\x82,\xD1]l\x15\xB0\xF0\n\b";
+ EXPECT_EQ(SignatureVerifier::CalculateHash("test"), expected_str);
+}
+
+KeyInfo GetKeyInfo(SecretKey key) {
+ KeyInfo info;
+ info.set_key(key.private_key());
+ info.set_hash_type(key.hash_type());
+ return info;
+}
+
+class SignatureVerifyPTest
+ : public ::testing::TestWithParam<SignatureInfo::HashType> {
+ public:
+ SignatureVerifyPTest() {
+ admin_key_ = KeyGenerator ::GeneratorKeys(SignatureInfo::RSA);
+ admin_verifier_ = std::make_unique<SignatureVerifier>(
+ GetKeyInfo(admin_key_), GetCertInfo(0));
+ }
+
+ CertificateInfo GetCertInfo(int64_t node_id) {
+ CertificateInfo cert_info;
+ cert_info.set_node_id(node_id);
+
+ cert_info.mutable_admin_public_key()->set_key(admin_key_.public_key());
+ cert_info.mutable_admin_public_key()->set_hash_type(admin_key_.hash_type());
+
+ return cert_info;
+ }
+
+ CertificateKey GetPublicKeyInfo(SecretKey key, int64_t node_id) {
+ CertificateKey cert_key;
+ cert_key.mutable_public_key_info()->mutable_key()->set_key(
+ key.public_key());
+ cert_key.mutable_public_key_info()->mutable_key()->set_hash_type(
+ key.hash_type());
+ cert_key.mutable_public_key_info()->set_node_id(node_id);
+
+ auto resp_info =
+ admin_verifier_->SignCertificateKeyInfo(cert_key.public_key_info());
+ assert(resp_info.ok());
+ *cert_key.mutable_certificate() = *resp_info;
+ return cert_key;
+ }
+
+ private:
+ SecretKey admin_key_;
+ std::unique_ptr<SignatureVerifier> admin_verifier_;
+};
+
+TEST_P(SignatureVerifyPTest, SignAndVerify) {
+ SignatureInfo::HashType type = GetParam();
+ absl::StatusOr<SignatureInfo> s_info;
+ std::string message = "test_message";
+ SecretKey my_key = KeyGenerator ::GeneratorKeys(type);
+ int64_t my_node_id = 1, your_node_id = 2;
+ {
+ SignatureVerifier verifier(GetKeyInfo(my_key), GetCertInfo(my_node_id));
+ s_info = verifier.SignMessage(message);
+ EXPECT_TRUE(s_info.ok());
+ EXPECT_EQ(s_info->node_id(), my_node_id);
+ }
+ {
+ SecretKey your_key = KeyGenerator ::GeneratorKeys(type);
+ SignatureVerifier verifier(GetKeyInfo(your_key), GetCertInfo(your_node_id));
+ verifier.AddPublicKey(GetPublicKeyInfo(my_key, my_node_id));
+ EXPECT_TRUE(verifier.VerifyMessage(message, *s_info));
+ }
+}
+
+TEST_P(SignatureVerifyPTest, KeyNotFound) {
+ SignatureInfo::HashType type = GetParam();
+
+ absl::StatusOr<SignatureInfo> s_info;
+ std::string message = "test_message";
+ SecretKey my_key = KeyGenerator ::GeneratorKeys(type);
+ int64_t my_node_id = 1, your_node_id = 2;
+
+ {
+ SignatureVerifier verifier(GetKeyInfo(my_key), GetCertInfo(my_node_id));
+ s_info = verifier.SignMessage(message);
+ EXPECT_TRUE(s_info.ok());
+ EXPECT_EQ(s_info->node_id(), my_node_id);
+ }
+
+ {
+ SecretKey your_key = KeyGenerator ::GeneratorKeys(type);
+ SignatureVerifier verifier(GetKeyInfo(your_key), GetCertInfo(your_node_id));
+ EXPECT_FALSE(verifier.VerifyMessage(message, *s_info));
+ }
+}
+
+TEST_P(SignatureVerifyPTest, KeyNotMatch) {
+ SignatureInfo::HashType type = GetParam();
+
+ absl::StatusOr<SignatureInfo> s_info;
+ std::string message = "test_message";
+ SecretKey my_key = KeyGenerator ::GeneratorKeys(type);
+ SecretKey your_key = KeyGenerator ::GeneratorKeys(type);
+ int64_t my_node_id = 1, your_node_id = 2;
+
+ {
+ SignatureVerifier verifier(GetKeyInfo(my_key), GetCertInfo(my_node_id));
+ s_info = verifier.SignMessage(message);
+ EXPECT_TRUE(s_info.ok());
+ EXPECT_EQ(s_info->node_id(), my_node_id);
+ }
+
+ {
+ SignatureVerifier verifier(GetKeyInfo(your_key), GetCertInfo(your_node_id));
+ verifier.AddPublicKey(GetPublicKeyInfo(your_key, my_node_id));
+ EXPECT_FALSE(verifier.VerifyMessage(message, *s_info));
+ }
+}
+
+INSTANTIATE_TEST_SUITE_P(SignatureVerifyPTest, SignatureVerifyPTest,
+ ::testing::Values(SignatureInfo::RSA,
+ SignatureInfo::ED25519,
+ SignatureInfo::CMAC_AES,
+ SignatureInfo::ECDSA));
+
+} // namespace
+
+} // namespace resdb
diff --git a/common/proto/BUILD b/common/proto/BUILD
new file mode 100644
index 00000000..d6647a53
--- /dev/null
+++ b/common/proto/BUILD
@@ -0,0 +1,20 @@
+package(default_visibility = ["//visibility:public"])
+
+load("@rules_cc//cc:defs.bzl", "cc_proto_library")
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@rules_proto_grpc//python:defs.bzl", "python_proto_library")
+
+proto_library(
+ name = "signature_info_proto",
+ srcs = ["signature_info.proto"],
+)
+
+cc_proto_library(
+ name = "signature_info_cc_proto",
+ deps = [":signature_info_proto"],
+)
+
+python_proto_library(
+ name = "signature_info_py_proto",
+ protos = [":signature_info_proto"],
+)
diff --git a/common/proto/signature_info.proto b/common/proto/signature_info.proto
new file mode 100644
index 00000000..607fe4ac
--- /dev/null
+++ b/common/proto/signature_info.proto
@@ -0,0 +1,61 @@
+syntax = "proto3";
+
+package resdb;
+
+message SignatureInfo {
+ enum HashType{
+ NONE = 0;
+ RSA = 1;
+ ED25519 = 2;
+ CMAC_AES = 3;
+ ECDSA = 4;
+ };
+
+ HashType hash_type = 1;
+ int64 node_id = 2;
+ bytes signature = 3;
+};
+
+message SecretKey {
+ bytes public_key = 1;
+ bytes private_key = 2;
+ SignatureInfo.HashType hash_type = 3;
+};
+
+message KeyInfo {
+ bytes key = 1;
+ SignatureInfo.HashType hash_type = 2;
+}
+
+message CertificateKeyInfo {
+ enum Type {
+ REPLICA = 0;
+ CLIENT = 1;
+ }
+ KeyInfo key = 1;
+ int64 node_id = 2;
+ Type type = 3;
+ string ip = 4;
+ int32 port = 5;
+ // the ip:port the replica uses, if it is a client node, can be ignored.
+}
+
+message CertificateKey {
+ CertificateKeyInfo public_key_info = 1; // the public key of current node.
+ SignatureInfo certificate = 2; // the certificate of `public_key_info`.
+}
+
+// CertificateInfo is published from the adminisotr and will be written to a cert file.
+message CertificateInfo {
+ KeyInfo admin_public_key = 1; // the public key owned by the administor.
+ CertificateKey public_key = 3; // public key info with certificate.
+ int64 node_id = 4;
+};
+
+// Used to construct SignatureVerifier.
+message SignatureKeyInfo {
+ KeyInfo admin_public_key = 1; // the public key owned by the administor.
+ KeyInfo private_key = 2; // the private key from the user, used to sign messages.
+ int64 node_id = 3; // the unique id of the replica or client.
+}
+
diff --git a/common/test/BUILD b/common/test/BUILD
new file mode 100644
index 00000000..df156e5c
--- /dev/null
+++ b/common/test/BUILD
@@ -0,0 +1,43 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "test",
+ hdrs = [
+ "test_macros.h",
+ ],
+ deps = [
+ "//common:comm",
+ "@com_google_googletest//:gtest",
+ "@com_google_protobuf//:protobuf",
+ ],
+)
+
+cc_library(
+ name = "test_main",
+ defines = ["TEST_MODE"],
+ deps = [
+ ":test",
+ "@com_google_googletest//:gtest_main",
+ ],
+)
+
+proto_library(
+ name = "test_proto",
+ srcs = ["test.proto"],
+ visibility = ["//visibility:private"],
+)
+
+cc_proto_library(
+ name = "test_cc_proto",
+ visibility = ["//visibility:private"],
+ deps = [":test_proto"],
+)
+
+cc_test(
+ name = "json_test",
+ srcs = ["json_test.cpp"],
+ deps = [
+ ":test_cc_proto",
+ ":test_main",
+ ],
+)
diff --git a/common/test/json_test.cpp b/common/test/json_test.cpp
new file mode 100644
index 00000000..50c83429
--- /dev/null
+++ b/common/test/json_test.cpp
@@ -0,0 +1,61 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include <gtest/gtest.h>
+
+#include "common/test/test.pb.h"
+#include "common/test/test_macros.h"
+
+namespace resdb {
+namespace testing {
+namespace {
+
+using ::resdb::testing::EqualsProto;
+
+TEST(SignatureVerifyTest, ParseFromJson) {
+ resdb::test::JsonMessage json_msg;
+
+ json_msg.set_id(1);
+ json_msg.set_data("data");
+ json_msg.mutable_sub_msg()->set_id(2);
+ json_msg.mutable_sub_msg()->set_data("sub_data");
+
+ std::string json =
+ "{ \
+ \"id\": 1, \
+ \"data\": \"data\", \
+ \"sub_msg\":{ \
+ \"id\": 2, \
+ \"data\":\"sub_data\" \
+ } \
+ }";
+
+ EXPECT_THAT(ParseFromText<resdb::test::JsonMessage>(json),
+ EqualsProto(json_msg));
+}
+
+} // namespace
+} // namespace testing
+} // namespace resdb
diff --git a/common/test/test.proto b/common/test/test.proto
new file mode 100644
index 00000000..c8a075d1
--- /dev/null
+++ b/common/test/test.proto
@@ -0,0 +1,15 @@
+syntax = "proto3";
+
+package resdb.test;
+
+message JsonSubMessage {
+ int64 id = 1;
+ string data = 2;
+};
+
+message JsonMessage {
+ int64 id = 1;
+ string data = 2;
+ JsonMessage sub_msg = 3;
+};
+
diff --git a/common/test/test_macros.h b/common/test/test_macros.h
new file mode 100644
index 00000000..6b3b8399
--- /dev/null
+++ b/common/test/test_macros.h
@@ -0,0 +1,53 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+#include <glog/logging.h>
+#include <google/protobuf/util/json_util.h>
+#include <google/protobuf/util/message_differencer.h>
+
+#include "gmock/gmock.h"
+
+namespace resdb {
+namespace testing {
+
+MATCHER_P(EqualsProto, replica, "") {
+ return ::google::protobuf::util::MessageDifferencer::Equals(arg, replica);
+}
+
+template <typename T>
+T ParseFromText(const std::string& json_str) {
+ T message;
+ google::protobuf::util::JsonParseOptions options;
+ auto st =
+ google::protobuf::util::JsonStringToMessage(json_str, &message, options);
+ if (!st.ok()) {
+ LOG(ERROR) << st.message();
+ }
+ return message;
+}
+
+} // namespace testing
+} // namespace resdb
diff --git a/common/utils/BUILD b/common/utils/BUILD
new file mode 100644
index 00000000..3f6d1d06
--- /dev/null
+++ b/common/utils/BUILD
@@ -0,0 +1,7 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "utils",
+ srcs = ["utils.cpp"],
+ hdrs = ["utils.h"],
+)
diff --git a/common/utils/utils.cpp b/common/utils/utils.cpp
new file mode 100644
index 00000000..164a7133
--- /dev/null
+++ b/common/utils/utils.cpp
@@ -0,0 +1,42 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "common/utils/utils.h"
+
+#include <stdlib.h>
+#include <sys/time.h>
+
+namespace resdb {
+
+#define CPU_FREQ 2.2
+#define TIME_ENABLE true
+
+uint64_t GetCurrentTime() {
+ struct timeval tv;
+ gettimeofday(&tv, nullptr);
+ return (uint64_t)(tv.tv_sec) * 1000000 + tv.tv_usec;
+}
+
+} // namespace resdb
diff --git a/common/utils/utils.h b/common/utils/utils.h
new file mode 100644
index 00000000..b66236c3
--- /dev/null
+++ b/common/utils/utils.h
@@ -0,0 +1,34 @@
+/*
+
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#pragma once
+
+#include <stdint.h>
+
+namespace resdb {
+
+uint64_t GetCurrentTime();
+
+} // namespace resdb
diff --git a/documents/doxygen/.gitignore b/documents/doxygen/.gitignore
new file mode 100644
index 00000000..67897178
--- /dev/null
+++ b/documents/doxygen/.gitignore
@@ -0,0 +1,2 @@
+html/
+latex/
diff --git a/documents/doxygen/Doxyfile b/documents/doxygen/Doxyfile
new file mode 100644
index 00000000..13911062
--- /dev/null
+++ b/documents/doxygen/Doxyfile
@@ -0,0 +1,2780 @@
+# Doxyfile 1.9.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+#
+# Note:
+#
+# Use doxygen to compare the used configuration file with the template
+# configuration file:
+# doxygen -x [configFile]
+# Use doxygen to compare the used configuration file with the template
+# configuration file without replacing the environment variables or CMake type
+# replacement variables:
+# doxygen -x_noenv [configFile]
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = ResilientDB
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER = v1.3.1
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF = ResilientDB
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO = logo.png
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
+# sub-directories (in 2 levels) under the output directory of each output format
+# and will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to
+# control the number of sub-directories.
+# The default value is: NO.
+
+CREATE_SUBDIRS = YES
+
+# Controls the number of sub-directories that will be created when
+# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
+# level increment doubles the number of directories, resulting in 4096
+# directories at level 8 which is the default and also the maximum value. The
+# sub-directories are organized in 2 levels, the first level always has a fixed
+# number of 16 directories.
+# Minimum value: 0, maximum value: 8, default value: 8.
+# This tag requires that the tag CREATE_SUBDIRS is set to YES.
+
+CREATE_SUBDIRS_LEVEL = 8
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian,
+# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English
+# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,
+# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with
+# English messages), Korean, Korean-en (Korean with English messages), Latvian,
+# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese,
+# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish,
+# Swedish, Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = YES
+
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# By default Python docstrings are displayed as preformatted text and doxygen's
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
+# doxygen's special commands can be used and the contents of the docstring
+# documentation blocks is shown as doxygen documentation.
+# The default value is: YES.
+
+PYTHON_DOCSTRING = YES
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:^^"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". Note that you cannot put \n's in the value part of an alias
+# to insert newlines (in the resulting output). You can put ^^ in the value part
+# of an alias to insert a newline as if a physical newline was in the original
+# file. When you need a literal { or } or , in the value part of an alias you
+# have to escape them by means of a backslash (\), this can lead to conflicts
+# with the commands \{ and \} for these it is advised to use the version @{ and
+# @} or use a double escape (\\{ and \\})
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files). For instance to make doxygen treat .inc files
+# as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen. When specifying no_extension you should add
+# * to the FILE_PATTERNS.
+#
+# Note see also the list of default file extension mappings.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 5
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
+# during processing. When set to 0 doxygen will based this on the number of
+# cores available in the system. You can set it explicitly to a value larger
+# than 0 to get more control over the balance between CPU load and processing
+# speed. At this moment only the input processing can be done using multiple
+# threads. Since this is still an experimental feature the default is set to 1,
+# which effectively disables parallel processing. Please report any issues you
+# encounter. Generating dot graphs in parallel is controlled by the
+# DOT_NUM_THREADS setting.
+# Minimum value: 0, maximum value: 32, default value: 1.
+
+NUM_PROC_THREADS = 1
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If this flag is set to YES, the name of an unnamed parameter in a declaration
+# will be determined by the corresponding definition. By default unnamed
+# parameters remain unnamed in the output.
+# The default value is: YES.
+
+RESOLVE_UNNAMED_PARAMS = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# will also hide undocumented C++ concepts if enabled. This option has no effect
+# if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
+# able to match the capabilities of the underlying filesystem. In case the
+# filesystem is case sensitive (i.e. it supports files in the same directory
+# whose names only differ in casing), the option must be set to YES to properly
+# deal with such files in case they appear in the input. For filesystems that
+# are not case sensitive the option should be set to NO to properly deal with
+# output files written for symbols that only differ in casing, such as for two
+# classes, one named CLASS and the other named Class, and to also support
+# references to files without having to specify the exact matching casing. On
+# Windows (including Cygwin) and MacOS, users should typically set this option
+# to NO, whereas on Linux or other Unix flavors it should typically be set to
+# YES.
+# Possible values are: SYSTEM, NO and YES.
+# The default value is: SYSTEM.
+
+CASE_SENSE_NAMES = SYSTEM
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
+# will show which file needs to be included to use the class.
+# The default value is: YES.
+
+SHOW_HEADERFILE = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file. See also section "Changing the
+# layout of pages" for information.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE = DoxygenLayout.xml
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as documenting some parameters in
+# a documented function twice, or documenting parameters that don't exist or
+# using markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
+# function parameter documentation. If set to NO, doxygen will accept that some
+# parameters have no documentation without warning.
+# The default value is: YES.
+
+WARN_IF_INCOMPLETE_DOC = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong parameter
+# documentation, but not about the absence of documentation. If EXTRACT_ALL is
+# set to YES then this flag will automatically be disabled. See also
+# WARN_IF_INCOMPLETE_DOC
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
+# undocumented enumeration values. If set to NO, doxygen will accept
+# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: NO.
+
+WARN_IF_UNDOC_ENUM_VAL = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
+# at the end of the doxygen process doxygen will return with a non-zero status.
+# Possible values are: NO, YES and FAIL_ON_WARNINGS.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# See also: WARN_LINE_FORMAT
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# In the $text part of the WARN_FORMAT command it is possible that a reference
+# to a more specific place is given. To make it easier to jump to this place
+# (outside of doxygen) the user can define a custom "cut" / "paste" string.
+# Example:
+# WARN_LINE_FORMAT = "'vi $file +$line'"
+# See also: WARN_FORMAT
+# The default value is: at line $line of file $file.
+
+WARN_LINE_FORMAT = "at line $line of file $file"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr). In case the file specified cannot be opened for writing the
+# warning and error messages are written to standard error. When as file - is
+# specified the warning and error messages are written to standard output
+# (stdout).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = ../../
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see:
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
+# See also: INPUT_FILE_ENCODING
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
+# character encoding on a per file pattern basis. Doxygen will compare the file
+# name with each pattern and apply the encoding instead of the default
+# INPUT_ENCODING) if there is a match. The character encodings are a list of the
+# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
+# "INPUT_ENCODING" for further information on supported encodings.
+
+INPUT_FILE_ENCODING =
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# Note the list of default checked file patterns might differ from the list of
+# default file extension mappings.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml,
+# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C
+# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
+# *.vhdl, *.ucf, *.qsf and *.ice.
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.idl \
+ *.ddl \
+ *.odl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.l \
+ *.cs \
+ *.d \
+ *.php \
+ *.php4 \
+ *.php5 \
+ *.phtml \
+ *.inc \
+ *.m \
+ *.markdown \
+ *.md \
+ *.mm \
+ *.dox \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f18 \
+ *.f \
+ *.for \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.ice
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# ANamespace::AClass, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that doxygen will use the data processed and written to standard output
+# for further processing, therefore nothing else, like debug statements or used
+# commands (so in case of a Windows batch file always use @echo OFF), should be
+# written to standard output.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+# The Fortran standard specifies that for fixed formatted Fortran code all
+# characters from position 72 are to be considered as comment. A common
+# extension is to allow longer lines before the automatic comment starts. The
+# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
+# be processed before the automatic comment starts.
+# Minimum value: 7, maximum value: 10000, default value: 72.
+
+FORTRAN_COMMENT_AFTER = 72
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# entity all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see https://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see:
+# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
+# performance. This can be particularly helpful with template rich C++ code for
+# which doxygen's built-in parser lacks the necessary type information.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS
+# tag is set to YES then doxygen will add the directory of each input to the
+# include path.
+# The default value is: YES.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_ADD_INC_PATHS = YES
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS =
+
+# If clang assisted parsing is enabled you can provide the clang parser with the
+# path to the directory containing a file called compile_commands.json. This
+# file is the compilation database (see:
+# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
+# options used when the source files were built. This is equivalent to
+# specifying the -p option to a clang tool, such as clang-check. These options
+# will then be passed to the parser. Any options specified with CLANG_OPTIONS
+# will be added as well.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+
+CLANG_DATABASE_PATH =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes)
+# that should be ignored while generating the index headers. The IGNORE_PREFIX
+# tag works for classes, function and member names. The entity will be placed in
+# the alphabetical list under the first letter of the entity name that remains
+# after removing the prefix.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER = header
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# Note: Since the styling of scrollbars can currently not be overruled in
+# Webkit/Chromium, the styling will be left out of the default doxygen.css if
+# one or more extra stylesheets have been specified. So if scrollbar
+# customization is desired it has to be added explicitly. For an example see the
+# documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET = doxygen_html_style.css
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
+# should be rendered with a dark or light theme.
+# Possible values are: LIGHT always generate light mode output, DARK always
+# generate dark mode output, AUTO_LIGHT automatically set the mode according to
+# the user preference, use light mode if no preference is set (the default),
+# AUTO_DARK automatically set the mode according to the user preference, use
+# dark mode if no preference is set and TOGGLE allow to user to switch between
+# light and dark mode via a button.
+# The default value is: AUTO_LIGHT.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE = DARK
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a color-wheel, see
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use gray-scales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = NO
+
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see:
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
+# create a documentation set, doxygen will generate a Makefile in the HTML
+# output directory. Running make will produce the docset in that directory and
+# running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag determines the URL of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDURL =
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# on Windows. In the beginning of 2021 Microsoft took the original page, with
+# a.o. the download links, offline the HTML help workshop was already many years
+# in maintenance mode). You can download the HTML help workshop from the web
+# archives at Installation executable (see:
+# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo
+# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the main .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location (absolute path
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
+# run qhelpgenerator on the generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = YES
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine tune the look of the index (see "Fine-tuning the output"). As an
+# example, the default style sheet generated by doxygen has an example that
+# shows how to put an image at the root of the tree instead of the PROJECT_NAME.
+# Since the tree basically has the same information as the tab index, you could
+# consider setting DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = YES
+
+# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
+# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
+# area (value NO) or if it should extend to the full height of the window (value
+# YES). Setting this to YES gives a layout similar to
+# https://docs.readthedocs.io with more room for contents, but less room for the
+# project logo, title, and description. If either GENERATE_TREEVIEW or
+# DISABLE_INDEX is set to NO, this option has no effect.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FULL_SIDEBAR = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
+# addresses.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+OBFUSCATE_EMAILS = YES
+
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
+# the HTML output. These images will generally look nicer at scaled resolutions.
+# Possible values are: png (the default) and svg (looks nicer but requires the
+# pdf2svg or inkscape tool).
+# The default value is: png.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FORMULA_FORMAT = png
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE =
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
+# Note that the different versions of MathJax have different requirements with
+# regards to the different settings, so it is possible that also other MathJax
+# settings have to be changed when switching between the different MathJax
+# versions.
+# Possible values are: MathJax_2 and MathJax_3.
+# The default value is: MathJax_2.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_VERSION = MathJax_2
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. For more details about the output format see MathJax
+# version 2 (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3
+# (see:
+# http://docs.mathjax.org/en/latest/web/components/output.html).
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility. This is the name for Mathjax version 2, for MathJax version 3
+# this will be translated into chtml), NativeMML (i.e. MathML. Only supported
+# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This
+# is the name for Mathjax version 3, for MathJax version 2 this will be
+# translated into HTML-CSS) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from https://www.mathjax.org before deployment. The default value is:
+# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
+# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH =
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# for MathJax version 2 (see https://docs.mathjax.org/en/v2.7-latest/tex.html
+# #tex-and-latex-extensions):
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# For example for MathJax version 3 (see
+# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
+# MATHJAX_EXTENSIONS = ams
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using JavaScript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/). See the section "External Indexing and Searching" for
+# details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME =
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for
+# the generated LaTeX document. The header should contain everything until the
+# first chapter. If it is left blank doxygen will generate a standard header. It
+# is highly recommended to start with a default header using
+# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty
+# and then modify the file new_header.tex. See also section "Doxygen usage" for
+# information on how to generate the default header that doxygen normally uses.
+#
+# Note: Only use a user-defined header if you know what you are doing!
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. The following
+# commands have a special meaning inside the header (and footer): For a
+# description of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for
+# the generated LaTeX document. The footer should contain everything after the
+# last chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer. See also section "Doxygen
+# usage" for information on how to generate the default footer that doxygen
+# normally uses. Note: Only use a user-defined footer if you know what you are
+# doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
+# files. Set this option to YES, to get a higher quality PDF documentation.
+#
+# See also section LATEX_CMD_NAME for selecting the engine.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP = NO
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to Sqlite3 output
+#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
... 47332 lines suppressed ...