Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor bullshit type, definition, database structure #314

Draft
wants to merge 451 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
451 commits
Select commit Hold shift + click to select a range
d2cd291
Refactor collection index endpoint
chiro-hiro Dec 10, 2024
8c79762
Move CollectionIndex to validation/collection
SangTran-127 Dec 10, 2024
c15baac
Merge pull request #351 from orochi-network/refactor/collection_index
SangTran-127 Dec 10, 2024
d67e6c1
Add session for model init
SangTran-127 Dec 10, 2024
12b3305
Refactor document related types and functions naming convention
wonrax Dec 11, 2024
27faf32
Fix document schema validator naming consistency
wonrax Dec 11, 2024
5e15874
Fix document history response type
wonrax Dec 11, 2024
d27f65a
Fix document history response naming
wonrax Dec 11, 2024
caad8d2
Merge pull request #353 from orochi-network/refactor/graphql_resolvers
chiro-hiro Dec 11, 2024
3dd4c4f
Refactor everything i do not know what to comment anymore, this code …
chiro-hiro Dec 11, 2024
ae95245
Merge remote-tracking branch 'origin/bug/refactor_bullshit_code' into…
chiro-hiro Dec 11, 2024
e38f489
Merge pull request #354 from orochi-network/refactor/everything
SangTran-127 Dec 11, 2024
ec3beef
Add proof type common
SangTran-127 Dec 11, 2024
ae5b810
Resolve merge conflict
SangTran-127 Dec 11, 2024
556e7b6
Add calling all init index
SangTran-127 Dec 11, 2024
7c60475
Remove unused duplicate type
SangTran-127 Dec 11, 2024
463aa24
add await before each index create
SangTran-127 Dec 11, 2024
a904b45
Resolve comments
SangTran-127 Dec 12, 2024
2127097
Resolve merkle height comment
SangTran-127 Dec 12, 2024
9487542
Remove unique for compound dbOwner and merkleHeight
SangTran-127 Dec 12, 2024
ec08ae8
Change appPulicKey index unique to true
SangTran-127 Dec 12, 2024
a29a04e
Revert appPulicKey index unique to false
SangTran-127 Dec 12, 2024
97e9117
Merge pull request #355 from orochi-network/refactor/add_session_and_…
wonrax Dec 12, 2024
655a712
Refactor group
SangTran-127 Dec 12, 2024
6fa13ba
WIP on document validation
wonrax Dec 12, 2024
4a3f6af
Move param to common package
SangTran-127 Dec 13, 2024
1709cd1
Moving param to types folder common
SangTran-127 Dec 13, 2024
c36ded7
Merge pull request #356 from orochi-network/refactor/group
chiro-hiro Dec 13, 2024
de9af67
Refactor collection, add param type and improve permission check
chiro-hiro Dec 13, 2024
23abc99
Add document validation and refactor conforming the new types
wonrax Dec 13, 2024
25f8cd6
Merge remote-tracking branch 'origin/bug/refactor_bullshit_code' into…
chiro-hiro Dec 13, 2024
c7589ad
Merge pull request #357 from orochi-network/refactor/collection_metata
SangTran-127 Dec 13, 2024
c1157eb
Refactor User use-case
SangTran-127 Dec 13, 2024
4d2b141
Complete collection endpoint refactor
chiro-hiro Dec 13, 2024
a4ad098
Fix naming convention
chiro-hiro Dec 13, 2024
2ebb508
Add transaction to collection list
chiro-hiro Dec 13, 2024
f3824ec
Merge pull request #359 from orochi-network/refactor/complete_collect…
SangTran-127 Dec 13, 2024
d5b0c7e
Rename signup method
Dec 13, 2024
9fe8bee
Refactor Databse
Dec 13, 2024
f6e374e
Update type for metadata of database
chiro-hiro Dec 13, 2024
6cfe1c8
Merge branch 'refactor/type_metadata_of_database' into refactor/user_…
Dec 13, 2024
42c80c3
Refactor group user and database
Dec 13, 2024
6a41646
Fix type error
wonrax Dec 14, 2024
bdf6b6c
Resolve comment
Dec 14, 2024
4cfafed
Fix list document history by updating PermissionSecurity func signature
wonrax Dec 14, 2024
63fde0d
Merge branch 'bug/refactor_bullshit_code' into refactor/document_rela…
wonrax Dec 14, 2024
c45db7e
Refactor list document history and add permission util for doc history
wonrax Dec 15, 2024
1b6ad20
Add double check joi with update group metadata
Dec 16, 2024
dc5c73f
Change JOI naming in database
SangTran-127 Dec 16, 2024
8f9ab49
Refactor ownership
SangTran-127 Dec 16, 2024
99122e3
Rename to instance model format and required transaction
SangTran-127 Dec 16, 2024
195ee5f
Add alias response type for boolean literal
SangTran-127 Dec 16, 2024
7b7b8a7
Move joi back to application where it should be
SangTran-127 Dec 16, 2024
638377c
Fix merkle tree and merkle proof endpoint
chiro-hiro Dec 16, 2024
4ee218d
Keep method name and type consistent
chiro-hiro Dec 16, 2024
ca7d1ca
Resolve comment, change timestamp to proofTimestamp and using userNam…
SangTran-127 Dec 16, 2024
0eae68d
Remove directly call DATABASE_ENGINE in dbInfo
SangTran-127 Dec 16, 2024
f97a4cf
Change database typedef
SangTran-127 Dec 16, 2024
cc38b57
Refactor prover
SangTran-127 Dec 16, 2024
4445d3c
Merge pull request #360 from orochi-network/refactor/user_use_case
SangTran-127 Dec 16, 2024
eabc1a0
Merge branch 'bug/refactor_bullshit_code' into refactor/ownership_use…
SangTran-127 Dec 16, 2024
c997585
Merge branch 'bug/refactor_bullshit_code' into refactor/prover_use_case
SangTran-127 Dec 16, 2024
7d74e4d
Refactor proof service
SangTran-127 Dec 16, 2024
79c859a
Fix all comments and rename method
chiro-hiro Dec 16, 2024
dbb8ec8
Merge pull request #361 from orochi-network/refactor/merkle_tree
SangTran-127 Dec 16, 2024
38d1a02
Fix naming convention inconsistency and structure permission params
wonrax Dec 16, 2024
1b39e8f
Refactor remove useless method transaction
SangTran-127 Dec 16, 2024
11505ec
Add note refactor transaction comment
SangTran-127 Dec 16, 2024
8f40441
Use ModelGeneral instead of ModelBasic
wonrax Dec 16, 2024
12da4b1
Fix joi validation on document resolvers
wonrax Dec 16, 2024
e0bcd6d
Update document graphql typedefs
wonrax Dec 16, 2024
ba06c29
Fix type proof.ts
SangTran-127 Dec 16, 2024
daabdc1
Merge pull request #362 from orochi-network/refactor/ownership_use_case
wonrax Dec 16, 2024
aad3371
Fix session naming
SangTran-127 Dec 16, 2024
66a343a
Use ModelDatabase instead of DATABASE_ENGINE
wonrax Dec 16, 2024
5bdd962
Create document modification response type
wonrax Dec 16, 2024
174c879
Change updateDocument to just update
wonrax Dec 16, 2024
a6ab5f8
Sync with latest code
SangTran-127 Dec 16, 2024
09dd49c
Fix any in Filter
wonrax Dec 16, 2024
61b431d
Remove intermediate `documents` variable in findHistoryOne
wonrax Dec 16, 2024
2b6e6e3
Add todo on parseQuery type annotation
wonrax Dec 16, 2024
9c16741
Change permissionParam plural to singular
wonrax Dec 16, 2024
5779486
Group document use cases into static class
wonrax Dec 17, 2024
5939471
Change graphql types to remove T prefixes
wonrax Dec 17, 2024
584c75a
Update the rest of document use cases to use permission params
wonrax Dec 17, 2024
d8a55a2
Fix wrong property findOne proof
SangTran-127 Dec 17, 2024
57e099b
Fix naming inconsistencies
wonrax Dec 17, 2024
5087c45
Add on todo check newOffChainState
SangTran-127 Dec 17, 2024
30e42d5
Remove junk comment
SangTran-127 Dec 17, 2024
2bd6bee
Change rollup to model general
SangTran-127 Dec 17, 2024
bf129f7
Merge pull request #363 from orochi-network/refactor/prover_use_case
wonrax Dec 17, 2024
2da0dcc
Merge pull request #358 from orochi-network/refactor/document_related…
SangTran-127 Dec 17, 2024
c95dce3
Update document to use new prover APIs
wonrax Dec 17, 2024
c7afbc6
Merge pull request #364 from orochi-network/fix/prover_incompatible_d…
SangTran-127 Dec 17, 2024
06709ac
Add on rollup config file
SangTran-127 Dec 17, 2024
ce6dd88
Merge branch 'bug/refactor_bullshit_code' into refactor/apply_rollup_…
SangTran-127 Dec 17, 2024
156ecab
Fix session problem and change load to getInstance merkleTree
SangTran-127 Dec 17, 2024
162dc38
Resolve import model
SangTran-127 Dec 17, 2024
4dfa750
Merge pull request #365 from orochi-network/bug/fix_session_prover
wonrax Dec 17, 2024
d4ee53b
Fix witness and database owner code
SangTran-127 Dec 17, 2024
fdbd9a4
Merge pull request #366 from orochi-network/bug/fix_database_owner_ol…
wonrax Dec 17, 2024
d0971c6
Remove specific validation and move common joi to index, resolve circ…
SangTran-127 Dec 17, 2024
77273af
Fix groupDetail
SangTran-127 Dec 17, 2024
224c7c7
Merge pull request #367 from orochi-network/bug/remove_validation_com…
wonrax Dec 17, 2024
8733999
Merge branch 'bug/refactor_bullshit_code' into refactor/apply_rollup_…
SangTran-127 Dec 17, 2024
946671d
Fix type and redefine graphql
chiro-hiro Dec 17, 2024
e73b35e
Add on resolve import problem
SangTran-127 Dec 17, 2024
11afab9
Merge pull request #368 from orochi-network/refactor/graphql_definition
SangTran-127 Dec 17, 2024
fe96442
Resolve merge conflict
SangTran-127 Dec 17, 2024
1428d7c
Merge pull request #369 from orochi-network/refactor/apply_rollup_res…
wonrax Dec 17, 2024
e9a2e6b
Refactor proof and type
chiro-hiro Dec 17, 2024
f627bd4
Merge pull request #370 from orochi-network/refactor/proof_and_type
wonrax Dec 17, 2024
0079088
WIP on conditional document resolver
wonrax Dec 17, 2024
3a358d7
Fixing user, group, collection, database for graphql
SangTran-127 Dec 17, 2024
f6cdf6a
Remove console log
SangTran-127 Dec 17, 2024
033fbd9
Finish compile service
SangTran-127 Dec 17, 2024
d907c8e
Resolve merge conflict
SangTran-127 Dec 17, 2024
36d6eab
Merge branch 'refactor/graphql_metadata_and_user' into refactor/compi…
SangTran-127 Dec 17, 2024
cd2226f
Add rollup for storage
SangTran-127 Dec 17, 2024
4d750f8
Refactor document find resolvers, prover validation logic
wonrax Dec 18, 2024
831d84c
Add example to GraphQLHelper doc comment
wonrax Dec 18, 2024
9bf7157
Change createBy to createdBy for consistency
SangTran-127 Dec 18, 2024
7f4fd1c
Merge branch 'refactor/graphql_metadata_and_user' into refactor/compi…
SangTran-127 Dec 18, 2024
4d55584
Merge pull request #371 from orochi-network/refactor/graphql_metadata…
wonrax Dec 18, 2024
26e29e4
Refactor document list query to use model instead of raw
wonrax Dec 18, 2024
1020003
Remove unused dbSetting type in common
SangTran-127 Dec 18, 2024
3e10454
Remove blank space
SangTran-127 Dec 18, 2024
9fd884e
Merge branch 'bug/refactor_bullshit_code' into refactor/compile_service
SangTran-127 Dec 18, 2024
c29f9e9
Fix naming and default value
SangTran-127 Dec 18, 2024
0e92c71
Remove boolean cover and using EOwnershipType for groupType joi
SangTran-127 Dec 18, 2024
5751abf
Cover joi with optional required
SangTran-127 Dec 18, 2024
ad94b6d
Package freeze compile service
SangTran-127 Dec 18, 2024
2165175
Commit yarn lock
SangTran-127 Dec 18, 2024
b811774
Add checking payerAddress
SangTran-127 Dec 18, 2024
12e5144
Merge pull request #372 from orochi-network/refactor/compile_service
chiro-hiro Dec 18, 2024
1c42669
Refactor operations on document to be more efficient and sound
wonrax Dec 18, 2024
2b1ab5d
Make permission optional when creating document
wonrax Dec 18, 2024
86ce5a4
Return additional docId and acknowledged to document create operation
wonrax Dec 18, 2024
32e47a1
Resolve graphql duplicate, resolve package and remove node-resolver r…
SangTran-127 Dec 18, 2024
7377c91
Merge pull request #374 from orochi-network/misc/update_external_and_…
wonrax Dec 18, 2024
2729db3
Fix validation error for document field
wonrax Dec 18, 2024
f1ae9c8
Merge branch 'bug/refactor_bullshit_code' into refactor/document_endp…
wonrax Dec 18, 2024
4997e54
Update default permission import from common
wonrax Dec 18, 2024
b8ea2b7
Fix throw new Error instead of just throw Error
wonrax Dec 18, 2024
8abe051
Add resolutions for graphql
SangTran-127 Dec 18, 2024
c91c0da
Merge pull request #375 from orochi-network/misc/add_resolution_for_g…
wonrax Dec 18, 2024
517e202
Merge branch 'bug/refactor_bullshit_code' into refactor/document_endp…
wonrax Dec 18, 2024
47a8a23
Use graphql enum for proof status instead of string
wonrax Dec 18, 2024
40797bf
Fix import alias for GraphqlHelper
wonrax Dec 18, 2024
089e4bc
Fix find document response type alias
wonrax Dec 18, 2024
30ea231
Remove unnecessary await on return
wonrax Dec 18, 2024
59cec59
Merge pull request #373 from orochi-network/refactor/document_endpoin…
SangTran-127 Dec 18, 2024
0967c97
Add default indexes for user created collections
wonrax Dec 18, 2024
6cdc7e1
Refactor rollup and proof
chiro-hiro Dec 18, 2024
489bcac
Merge remote-tracking branch 'origin/bug/refactor_bullshit_code' into…
chiro-hiro Dec 18, 2024
6c7b2c3
Merge pull request #376 from orochi-network/feature/add_builtin_index…
SangTran-127 Dec 18, 2024
568330a
Fix PR following suggestion
chiro-hiro Dec 18, 2024
4f0b17b
Merge pull request #377 from orochi-network/refactor/rollup_and_proof
SangTran-127 Dec 18, 2024
93adab1
Make compound transaction return type not nullable
wonrax Dec 19, 2024
fd97c4e
Fix type document request/return inconsistencies
wonrax Dec 19, 2024
7bb0137
Fix document history type inconsistencies
wonrax Dec 19, 2024
62afc79
Update packages/common/src/types/document.ts
wonrax Dec 19, 2024
49eada8
Update packages/serverless/src/domain/use-case/document-history.ts
wonrax Dec 19, 2024
5854455
Fix unnecessary nullable type annotation
wonrax Dec 19, 2024
5ad3f1c
Merge pull request #378 from orochi-network/fix/compound_transaction_…
SangTran-127 Dec 19, 2024
d7eb954
Package freeze and remove unused package
SangTran-127 Dec 19, 2024
5c6409d
Merge pull request #379 from orochi-network/bug/remove_unused_package…
wonrax Dec 19, 2024
abfde0a
Init mina-service
SangTran-127 Dec 19, 2024
a4a2252
Install @zkdb common
SangTran-127 Dec 19, 2024
72d3bd9
Fix outdated code using the old CompoundSession
wonrax Dec 19, 2024
6c2471d
Fix prover use case type error
wonrax Dec 19, 2024
ae4dea6
Merge pull request #381 from orochi-network/fix/document_usecase_type…
SangTran-127 Dec 19, 2024
d63d7b4
Merge pull request #380 from orochi-network/refactor/init_mina_servic…
wonrax Dec 19, 2024
a3f94a2
Change naming for zk compile
SangTran-127 Dec 19, 2024
4d1710e
Fix monorepo configuration
chiro-hiro Dec 19, 2024
202bacc
Merge remote-tracking branch 'origin/bug/refactor_bullshit_code' into…
chiro-hiro Dec 19, 2024
0bce939
Fix dbCreate and userMe
SangTran-127 Dec 19, 2024
e44b00a
Merge pull request #382 from orochi-network/bug/fix_dbCreate_and_userMe
wonrax Dec 19, 2024
505a0d1
Add env and cluster app
SangTran-127 Dec 19, 2024
9e293fd
Merge branch 'bug/refactor_bullshit_code' into refactor/init_mina_ser…
SangTran-127 Dec 19, 2024
7764b7e
Finish compile service
SangTran-127 Dec 19, 2024
fb4fcd9
Add start:prod script
SangTran-127 Dec 19, 2024
f152047
Implement document history returning the revisions of an active document
wonrax Dec 19, 2024
f279345
Update packages/serverless/src/apollo/app/document.ts
wonrax Dec 19, 2024
19c0fbd
Fix missing mongodb session on queries
wonrax Dec 19, 2024
8851acf
Reuse global packages instead of local one
chiro-hiro Dec 19, 2024
b408ca2
Delete devel.sh
chiro-hiro Dec 19, 2024
420b566
Merge pull request #384 from orochi-network/feature/document_history
SangTran-127 Dec 19, 2024
bdf4311
Merge pull request #385 from orochi-network/refactor/package_link_and…
SangTran-127 Dec 19, 2024
61abe43
Add common packages to workspace package.json
chiro-hiro Dec 19, 2024
a12cd5a
Merge remote-tracking branch 'origin/bug/refactor_bullshit_code' into…
chiro-hiro Dec 19, 2024
58893fe
Merge pull request #386 from orochi-network/refactor/move_common_pack…
SangTran-127 Dec 19, 2024
85883db
WIP: handling create transaction
SangTran-127 Dec 19, 2024
17d2176
Resolve merge conflict
SangTran-127 Dec 19, 2024
bf79dcb
Resolve conflict
SangTran-127 Dec 19, 2024
73bf2f6
Resolve missing conflict
SangTran-127 Dec 19, 2024
4e0ad24
Merge pull request #383 from orochi-network/feature/apply_compile_ser…
chiro-hiro Dec 19, 2024
3475c6b
Add on service transaction
SangTran-127 Dec 20, 2024
8f49ff8
Finish transaction service
SangTran-127 Dec 20, 2024
acec1bb
Remove required sorting
SangTran-127 Dec 20, 2024
7034510
Merge pull request #388 from orochi-network/bug/remove_required_sorti…
wonrax Dec 20, 2024
fc99b70
Remove wrong unique index
SangTran-127 Dec 20, 2024
8fd9563
Merge pull request #389 from orochi-network/bug/remove_wrong_unique_i…
wonrax Dec 20, 2024
1216f08
Apply fill
SangTran-127 Dec 20, 2024
149cc20
Refactor mina proof task service
wonrax Dec 20, 2024
c070740
Add missing userObjectId createdAt and groupName for addUserListToGroup
SangTran-127 Dec 20, 2024
ce7e372
Merge pull request #391 from orochi-network/bug/add_on_missing_proper…
wonrax Dec 20, 2024
7251b3a
Merge branch 'bug/refactor_bullshit_code' into feature/add_transactio…
SangTran-127 Dec 20, 2024
35bfc27
Add on fill
SangTran-127 Dec 20, 2024
cd6c7d0
Add isRunning prevent overlapping race condition
SangTran-127 Dec 20, 2024
9c6b0c2
Remove console log
SangTran-127 Dec 20, 2024
b91703d
Merge pull request #387 from orochi-network/feature/add_transaction_s…
wonrax Dec 20, 2024
b00a3ae
Merge branch 'bug/refactor_bullshit_code' into refactor/mina_task_ser…
wonrax Dec 20, 2024
2f7c7e1
Merge pull request #390 from orochi-network/refactor/mina_task_service
SangTran-127 Dec 20, 2024
f91e0a9
Ensure publicKey from privateKey and appPublicKey are matching
SangTran-127 Dec 20, 2024
62ce070
Remove add owner to participant
SangTran-127 Dec 20, 2024
239d8f5
Document update and drop operations now accept a docId instead of query
wonrax Dec 20, 2024
f292a7f
Remove get prefix
SangTran-127 Dec 20, 2024
097ff18
Merge pull request #392 from orochi-network/feature/enhance_checking_…
wonrax Dec 20, 2024
cb85d9b
Change naming and remove dbTransferOwnership and all it related
SangTran-127 Dec 20, 2024
f35c1ea
Merge pull request #393 from orochi-network/fix/single_document_drop_…
SangTran-127 Dec 20, 2024
c4c0321
Merge pull request #394 from orochi-network/bug/change_metadata_consi…
wonrax Dec 20, 2024
fb2b4ad
Fix connected DB bug
SangTran-127 Dec 20, 2024
dd1ddc0
Merge branch 'bug/refactor_bullshit_code' of github.com:orochi-networ…
SangTran-127 Dec 20, 2024
c710021
Change UInt32 underlying type from bigint to number, add jest deps back
wonrax Dec 20, 2024
9a8e6d5
Merge pull request #395 from orochi-network/bug/fix_database_not_connect
wonrax Dec 20, 2024
1072727
Merge pull request #396 from orochi-network/fix/uint32_bigint_to_number
SangTran-127 Dec 20, 2024
a4d5e1a
Fix wrong graphql type
SangTran-127 Dec 20, 2024
6bdc822
Merge pull request #397 from orochi-network/bug/fix_wrong_graphql_typ…
wonrax Dec 20, 2024
adb8a22
Fix proof task queue processing status mismatch
wonrax Dec 20, 2024
454742a
Rename transaction submit
SangTran-127 Dec 20, 2024
910b63c
Merge pull request #398 from orochi-network/fix/proof_service_status_…
SangTran-127 Dec 20, 2024
48b6e4a
Merge pull request #399 from orochi-network/bug/rename_transaction_su…
wonrax Dec 20, 2024
fc93905
Update Dockerfiles to use Node.js 22 and adjust workspace build order
harris1111 Dec 20, 2024
988e8ce
Merge branch 'bug/refactor_bullshit_code' into devops/update_dockerfile
harris1111 Dec 20, 2024
77225cd
Update Dockerfiles to create non-root user with specific UID and GID
harris1111 Dec 20, 2024
488b3e1
Merge branch 'bug/refactor_bullshit_code' into devops/update_dockerfile
harris1111 Dec 20, 2024
147e677
Merge pull request #400 from orochi-network/devops/update_dockerfile
dqtkien Dec 20, 2024
f5ce184
Proof service loop now backoff when error
wonrax Dec 20, 2024
d57642a
Add on node resolver
SangTran-127 Dec 20, 2024
1574890
Merge pull request #401 from orochi-network/fix/proof_service_infinit…
SangTran-127 Dec 20, 2024
46a2c4d
Merge pull request #403 from orochi-network/misc/use_rollup_resolve_e…
wonrax Dec 20, 2024
8046e65
Exclude resolve o1js
SangTran-127 Dec 20, 2024
c0003e6
Merge pull request #404 from orochi-network/misc/use_rollup_resolve_e…
wonrax Dec 20, 2024
63774cd
Fix mongodb update misuse
wonrax Dec 20, 2024
8e1bc41
Change to queue
SangTran-127 Dec 20, 2024
f027cbc
Merge branch 'bug/refactor_bullshit_code' of github.com:orochi-networ…
SangTran-127 Dec 20, 2024
3408b26
Remove node-cron
SangTran-127 Dec 20, 2024
b5f7044
Merge pull request #405 from orochi-network/fix/proof_update_misuse
SangTran-127 Dec 20, 2024
8e0688b
Merge pull request #406 from orochi-network/misc/change_node_cron_to_…
wonrax Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 10 additions & 10 deletions .github/workflows/build-and-push-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Build & Push All Docker Images to Docker Hub with Change Detection'
name: "Build & Push All Docker Images to Docker Hub with Change Detection"

on:
push:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full commit history
fetch-depth: 0 # Fetch full commit history

- name: Detect last two merge commits and diff
id: changed
Expand All @@ -25,10 +25,10 @@ jobs:
MERGE_ARRAY=($LAST_MERGE)
LAST_MERGE_COMMIT=${MERGE_ARRAY[0]}
PREV_MERGE_COMMIT=${MERGE_ARRAY[1]}

echo "Last merge commit: $LAST_MERGE_COMMIT"
echo "Previous merge commit: $PREV_MERGE_COMMIT"

CHANGED_PACKAGES=$(git diff --name-only $PREV_MERGE_COMMIT $LAST_MERGE_COMMIT -- packages/ | cut -d '/' -f 1-2 | sort -u)
CLEANED_PACKAGES=$(echo "$CHANGED_PACKAGES" | tr -d '\r' | tr '\n' ' ')
echo "Cleaned packages: $CLEANED_PACKAGES"
Expand All @@ -46,7 +46,7 @@ jobs:
case $PACKAGE in
"packages/serverless") FILTERED_PACKAGES="$FILTERED_PACKAGES 1" ;;
"packages/broker-service") FILTERED_PACKAGES="$FILTERED_PACKAGES 2" ;;
"packages/proof-service") FILTERED_PACKAGES="$FILTERED_PACKAGES 3" ;;
"packages/mina-service") FILTERED_PACKAGES="$FILTERED_PACKAGES 3" ;;
"packages/ftp") FILTERED_PACKAGES="$FILTERED_PACKAGES 4" ;;
"packages/compile-service ") FILTERED_PACKAGES="$FILTERED_PACKAGES 5" ;;
esac
Expand All @@ -65,8 +65,8 @@ jobs:
env:
version: ${{ github.sha }}
SERVICES: "serverless broker proof ftp compile"
SERVICES_BUILD: "serverless broker-service proof-service ftp compile-service"
DOCKER_REPOS: "orochinetwork/zkdb-serverless orochinetwork/zkdb-broker-service orochinetwork/zkdb-proof-service orochinetwork/zkdb-ftp orochinetwork/zkdb-compile-service"
SERVICES_BUILD: "serverless broker-service mina-service ftp compile-service"
DOCKER_REPOS: "orochinetwork/zkdb-serverless orochinetwork/zkdb-broker-service orochinetwork/zkdb-mina-service orochinetwork/zkdb-ftp orochinetwork/zkdb-compile-service"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -82,12 +82,12 @@ jobs:

- name: Build & Push Docker Images
id: build
run: |
run: |
IFS=' ' read -r -a DOCKER_REPOS <<< "${{env.DOCKER_REPOS}}"
IFS=' ' read -r -a SERVICES_BUILD <<< "${{env.SERVICES_BUILD}}"
IFS=' ' read -r -a SERVICES <<< "${{env.SERVICES}}"
CHANGED_SERVICES="${{ needs.detect-changes.outputs.filtered_packages }}"

for i in ${!SERVICES_BUILD[@]}; do
SERVICE_BUILD="${SERVICES_BUILD[$i]}"
SERVICE="${SERVICES[$i]}"
Expand Down Expand Up @@ -148,4 +148,4 @@ jobs:
steps:
- name: Cleanup
run: |
rm -rf {{ secrets.GITOPS_REPO_NAME }}
rm -rf {{ secrets.GITOPS_REPO_NAME }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,5 @@ circuit-cache/

#private
npm-token
.npmrc
.npmrc
package-lock.json
12 changes: 6 additions & 6 deletions Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ cd general/database/script
chmod +x start.sh
./start.sh
cd ..
docker compose up -d
docker compose up -d
```

You can modify the environment variables in the `docker-compose.yml` file based on your requirements. If you keep the default settings, your MongoDB URL will be:
Expand All @@ -61,7 +61,7 @@ MONGODB_URL="mongodb://admin:password@mongo:27017/?directConnection=true"

### Proof-Service Setup

To start `proof-service`, you need to run `broker-service` first. Then, set the `BROKER_URL` in the `.env` file of `proof-service` to:
To start `mina-service`, you need to run `broker-service` first. Then, set the `BROKER_URL` in the `.env` file of `mina-service` to:

```bash
BROKER_URL="http://broker-service-app-1:4001/graphql"
Expand Down Expand Up @@ -100,7 +100,7 @@ To build Docker images for all services:
make build
```

This command will build the following services: `ftp`, `proof-service`, `broker-service`, and `serverless`.
This command will build the following services: `ftp`, `mina-service`, `broker-service`, and `serverless`.

To build a specific service, such as `ftp`, use:

Expand All @@ -122,7 +122,7 @@ To run a specific service, such as `ftp`:
make up-ftp
```

To run multiple specific services, such as `ftp` and `proof-service`:
To run multiple specific services, such as `ftp` and `mina-service`:

```bash
make up-ftp up-proof
Expand All @@ -140,8 +140,8 @@ make down

### 9.2 Stop Specific Services

To stop specific services, such as `ftp` and `proof-service`:
To stop specific services, such as `ftp` and `mina-service`:

```bash
make stop-ftp stop-proof
```
```
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Define variables for Docker image tags and paths
BROKER_SERVICE_TAG = broker-service
PROOF_SERVICE_TAG = proof-service
PROOF_SERVICE_TAG = mina-service
FTP_SERVICE_TAG = ftp-service
SERVERLESS_TAG = serverless
PLATFORM_TAG = linux/amd64 # You can choose between linux/amd64 for x86_64 and linux/arm64 for arm64

BROKER_SERVICE_DOCKERFILE = packages/broker-service/Dockerfile
PROOF_SERVICE_DOCKERFILE = packages/proof-service/Dockerfile
PROOF_SERVICE_DOCKERFILE = packages/mina-service/Dockerfile
FTP_SERVICE_DOCKERFILE = packages/ftp/Dockerfile
SERVERLESS_DOCKERFILE = packages/serverless/Dockerfile

BROKER_SERVICE_COMPOSE = packages/broker-service/docker-compose.yml
PROOF_SERVICE_COMPOSE = packages/proof-service/docker-compose.yml
PROOF_SERVICE_COMPOSE = packages/mina-service/docker-compose.yml
FTP_COMPOSE = packages/ftp/docker-compose.yml
SERVERLESS_COMPOSE = packages/serverless/docker-compose.yml
MONGO_COMPOSE = general/database/docker-compose.yml
Expand Down
1 change: 0 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
zkDatabase

Copyright © 2023 Orochi Network
12 changes: 12 additions & 0 deletions devel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

ROOT_DIR=`pwd`
find `pwd` -name "node_modules" -exec rm -rf {} \;
rm -rf yarn.lock
yarn
cd $ROOT_DIR/packages/permission && yarn build
cd $ROOT_DIR/packages/common && yarn build
cd $ROOT_DIR/packages/storage && yarn build
cd $ROOT_DIR/packages/serverless && yarn build
cd $ROOT_DIR/packages/api && yarn build
cd $ROOT_DIR/packages/zkdb && yarn build
1 change: 1 addition & 0 deletions packages/serverless/eslint.config.js → eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import gitignore from 'eslint-config-flat-gitignore';
* config. We envision this as a necessary transitional step to allow the
* ecosystem to slowly convert over to flat config.
* https://eslint.org/blog/2022/08/new-config-system-part-2 */

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
Expand Down
18 changes: 9 additions & 9 deletions examples/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1560,10 +1560,10 @@
dependencies:
tslib "^2.3.0"

"@zkdb/api@1.1.13":
version "1.1.13"
resolved "https://registry.yarnpkg.com/@zkdb/api/-/api-1.1.13.tgz#901d9cf05135273d8bb95da8a058189041cb33b5"
integrity sha512-pdPRsmaK9fec1M9wVsIjMA21ys4vyVG2LauxrWHy08m3Zdz9s74w0lYFKNzhhkFg7C+627z0Zcdb+adqC+542A==
"@zkdb/api@^1.1.14":
version "1.1.14"
resolved "https://registry.yarnpkg.com/@zkdb/api/-/api-1.1.14.tgz#83d485a7ad294c5596b5c6044688a0fa85c9a960"
integrity sha512-TB/LfMbntkwqORihxQm0AfGiWoRArJHpRkIBVUrghHl34XPNJ00jJc/DzFeM3n7JZJ7ZekfL8tICxJB9z1Q4Vg==
dependencies:
"@apollo/client" "^3.10.6"
"@types/node" "^22.6.1"
Expand Down Expand Up @@ -4538,12 +4538,12 @@ zen-observable@0.8.15:
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==

zkdb@^1.2.11:
version "1.2.11"
resolved "https://registry.yarnpkg.com/zkdb/-/zkdb-1.2.11.tgz#dcde196aa2848815ed1c3c797fa45c297e0c540a"
integrity sha512-do+2//WD+xW2VOcPdiRaeO5cfnZcItB0UNfLCCQzHu52IfB/oH+xpnFer2f4aodxvKLdYzuPtzA52mjUro0bPw==
zkdb@^1.2.12:
version "1.2.12"
resolved "https://registry.yarnpkg.com/zkdb/-/zkdb-1.2.12.tgz#54ca72c6b6e8e0c96a6d8037846fbd8c5aadea7c"
integrity sha512-zG9CAQDeAo1Xk6Ov09ThHvWEgqyTAvI7jTVR2KDcadY9ZcojuKDjbtxdMSwu2g25PkByUJo66jnovuJ6Ch38xQ==
dependencies:
"@zkdb/api" "1.1.13"
"@zkdb/api" "^1.1.14"
"@zkdb/smart-contract" "1.1.7"
graphql "16.9.0"
graphql-request "7.1.2"
Expand Down
41 changes: 38 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "zkdb-monorepo",
"private": true,
"type": "module",
"workspaces": [
"packages/common",
"packages/storage",
"packages/smart-contract",
"packages/kubo",
"packages/proof-service",
"packages/mina-service",
"packages/api",
"packages/permission",
"packages/zkdb",
Expand All @@ -22,9 +24,42 @@
},
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610",
"devDependencies": {
"spectaql": "^3.0.2"
"@babel/preset-env": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.1.2",
"@types/cors": "^2.8.17",
"@types/express-fileupload": "1.5.1",
"@types/express-session": "1.18.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"babel-jest": "^29.7.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-require-extensions": "^0.1.3",
"graphql-request": "^7.1.2",
"jest": "^29.7.0",
"prettier": "^3.4.2",
"rollup": "^4.28.1",
"spectaql": "^3.0.2",
"ts-jest": "^29.2.5",
"typedoc": "^0.27.5",
"typescript": "^5.7.2"
},
"dependencies": {
"o1js": "1.9.*"
"bullmq": "5.34.3",
"graphql": "16.10.0",
"graphql-type-json": "0.3.2",
"joi": "17.13.3",
"mongodb": "6.12.0",
"o1js": "1.9.1"
}
}
14 changes: 3 additions & 11 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,9 @@
"description": "",
"dependencies": {
"@apollo/client": "^3.10.6",
"@types/node": "^22.6.1",
"graphql": "^16.9.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.6.2"
"@zkdb/common": "^0.1.1"
},
"devDependencies": {
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-typescript": "^12.1.0",
"rollup": "^4.22.4"
"peerDependencies": {
"graphql": "^16.10.0"
}
}
3 changes: 3 additions & 0 deletions packages/api/src/graphql/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { document } from "./document";
import { environment } from "./environment";
import { group } from "./group";
import { merkle } from "./merkle";
import { metadata } from "./metadata";
import { ownership } from "./ownership";
import { permission } from "./permission";
import { proof } from "./proof";
Expand All @@ -36,6 +37,7 @@ export interface IApiClient<T = any> {
transaction: ReturnType<typeof transaction>;
rollup: ReturnType<typeof rollup>;
environment: ReturnType<typeof environment>;
metadata: ReturnType<typeof metadata>;
}

export class ApiClient<T = any> {
Expand Down Expand Up @@ -123,6 +125,7 @@ export class ApiClient<T = any> {
transaction: transaction(api.apollo),
rollup: rollup(api.apollo),
environment: environment(api.apollo),
metadata: metadata(api.#client),
};
}
}
24 changes: 13 additions & 11 deletions packages/api/src/graphql/collection-index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { gql } from "@apollo/client";
import {
TIndexCreateRequest,
TIndexDropRequest,
TIndexExistRequest,
TIndexListRequest,
TIndexListResponse,
} from "@zkdb/common";
import {
createMutateFunction,
createQueryFunction,
TApolloClient,
} from "./common";
import { TCollectionIndex } from "./types/collection-index";

const COLLECTION_INDEX_CREATE = gql`
mutation IndexCreate(
Expand Down Expand Up @@ -57,26 +63,22 @@ const COLLECTION_INDEX_LIST = gql`
export const collectionIndex = <T>(client: TApolloClient<T>) => ({
create: createMutateFunction<
boolean,
{
databaseName: string;
collectionName: string;
index: TCollectionIndex[];
},
TIndexCreateRequest,
{ indexCreate: boolean }
>(client, COLLECTION_INDEX_CREATE, (data) => data.indexCreate),
delete: createMutateFunction<
drop: createMutateFunction<
boolean,
{ databaseName: string; collectionName: string; indexName: string },
TIndexDropRequest,
{ indexDrop: boolean }
>(client, COLLECTION_INDEX_DELETE, (data) => data.indexDrop),
exist: createQueryFunction<
boolean,
{ databaseName: string; collectionName: string; indexName: string },
TIndexExistRequest,
{ indexExist: boolean }
>(client, COLLECTION_INDEX_EXIST, (data) => data.indexExist),
list: createQueryFunction<
string[],
{ databaseName: string; collectionName: string },
{ indexList: string[] }
TIndexListRequest,
{ indexList: TIndexListResponse }
>(client, COLLECTION_INDEX_LIST, (data) => data.indexList),
});
Loading