Skip to content

Commit

Permalink
contract upgrade and database meta management support (#556)
Browse files Browse the repository at this point in the history
* feat: add doc store

* feat: add doc order and event recover

* feat: add recover

* feat: add start block

* fix: fix the recover bug

* fix: remove unused module

* fix: remove docker cd

* fix: print the test environment output log

* fix: start localnet for every step

* fix: add cd for cargo test

* feat: remove kill process

* feat: update start local net

* fix: fix the test case

* fix: fix the java ut case

* feat: add types , events and interface

* feat: add description to the database

* feat: impl the interface

* feat: add network register test

* feat: adjust the struct

* test: add exeception test

* test: add get network test

* feat: add get database

* feat: update the architecture

* test: add create database and create collection test

* test: add test file

* fix: adjust the image size

* test: add transfer test

* test: add transfer database test

* feat: add license to collection

* fix: remove agent from arweave-rs

* feat: update metastore

* test: add register a lot of network

* test: add register data network test

* test: add get state

* test: add metstore test case

* fix: remove unused code

* feat: add fork network method

* test: fix the recover case

* fix: remove unused the library

* fix: fix the compile error

* test: adjust the ci order

* test: add sleep

* test: add sleep

* feat: add echo to show start script information

* fix: remove some cases temporary
  • Loading branch information
imotai committed Jul 9, 2023
1 parent 4667bd8 commit 2dd6abd
Show file tree
Hide file tree
Showing 61 changed files with 2,749 additions and 4,787 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@ jobs:
- uses: taiki-e/install-action@nextest
- name: Setup Build env
run: |
sudo apt-get install protobuf-compiler
protoc --version
ROOT_DIR=`pwd`
sudo apt-get install protobuf-compiler
cd ${ROOT_DIR}/metadata && yarn install
cd ${ROOT_DIR}/metadata && npx hardhat compile --force && echo "return code $?"
ls ${ROOT_DIR}/metadata
cd ${ROOT_DIR}/metadata && npx hardhat test && echo "return code $?"
cd ${ROOT_DIR}/metadata && npx hardhat test
test -e ${ROOT_DIR}/metadata/artifacts/contracts/DB3MetaStore.sol/DB3MetaStore.json && cp -f ${ROOT_DIR}/metadata/artifacts/contracts/DB3MetaStore.sol/DB3MetaStore.json ${ROOT_DIR}/abi/
cd ${ROOT_DIR} && cargo build
cd ${ROOT_DIR}/tools && bash start_localnet.sh
sleep 2
export RUST_BACKTRACE=1
- name: Run Typescript sdk test
run: |
ROOT_DIR=`pwd`
Expand All @@ -71,6 +69,7 @@ jobs:
cd ${ROOT_DIR}/java && mvn test
- name: Run rust test with coverage
run: |
export RUST_BACKTRACE=1
cargo llvm-cov nextest --workspace --exclude merkdb --lcov --output-path lcov.info --no-fail-fast
- uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ members = [
"src/crypto",
"src/proto",
"src/error",
"src/types",
"src/base",
"src/storage",
"src/node",
Expand All @@ -17,6 +16,6 @@ fastcrypto = {git = "https://github.com/MystenLabs/fastcrypto", rev = "306465d4f
ethers = {git="https://github.com/imotai/ethers-rs", rev="d526191b7972e8cf4412fee8b71cbf42e0ce7995"}
tonic = {git="https://github.com/hyperium/tonic", rev="ae7580160431cd25c1eecda4c85014ef6ce8d93f"}
tonic-web = {git="https://github.com/hyperium/tonic", rev="ae7580160431cd25c1eecda4c85014ef6ce8d93f"}
arweave-rs = {git="https://github.com/imotai/arweave-rs", rev="4bdb736c565dbce0f3ff698f0265e7e781cca1d6"}
arweave-rs = {git="https://github.com/imotai/arweave-rs", rev="c46183c4cef05004685e53a869606d18abcbcdf2"}
ejdb2rs = {git="https://github.com/imotai/ejdb2rs", rev="dfe9a00c66986c072b8375ce68086b9c98ded4fe"}
serde_json= "1.0"
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ DB3 Network is a Lightweight, *Permanent* JSON document database for Web3. It is
1. Using DB3 Network as a JSON document database.
2. Periodically rolling up the JSON document to the [Arweave](https://www.arweave.org/) at a very low cost.


# Have a try

## Set up self-hosted Node
Expand Down Expand Up @@ -102,8 +101,20 @@ The DB3 Network has two roles:
To prevent tampering, every
JSON document must be signed by its owner. Only the owner can update or delete the JSON document.
<p align="center">
<img width="500px" src="./docs/images/db3_arch.png" align="center"/>
<img width="800px" src="./docs/images/db3_arch.png"/>

## The Plan to support public chain list

| Public Chains | Testnet | Mainnet |
|----------|:-------------:|:------:|
| Arweave | :heavy_check_mark: | :heavy_check_mark:|
| Polygon | :heavy_check_mark: [Mumbai](https://mumbai.polygonscan.com/address/0xb9709cE5E749b80978182db1bEdfb8c7340039A9) | :soon: |
| Zksync | :soon: | :soon: |
| Scroll | :soon: | :soon: |
| Arbitrum | :soon: | :soon: |
| Optimism | :soon: | :soon: |

If you want us to support the other public chains, just give us an [issue](https://github.com/dbpunk-labs/db3/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=)

# What can we build with the db3 network?

Expand Down

0 comments on commit 2dd6abd

Please sign in to comment.