Skip to content

Commit

Permalink
feat: aptos da client (#9)
Browse files Browse the repository at this point in the history
* feat: Aptos Settelement Layer (#7)

* feat(aptos_settlement_client): update state kzg & update state & verify inclusion

* test(aptos_settlement_client): add update_state, state_block_number unit test

* fix: dependencies

* refactor code

* feat: add submodule ionia

* feat(aptos_settlement_client): update state kzg & update state & verify inclusion

* test(aptos_settlement_client): add update_state, state_block_number unit test

* fix: dependencies

* refactor code

* feat: add submodule ionia

* refactor code

* refactor code

---------

Co-authored-by: Steve Nguyen <[email protected]>

* feat: pull request template

* Bump ionia from `3a15977` to `fe4cd5a` (#10)

Bumps [ionia](https://github.com/sota-zk-labs/ionia) from `3a15977` to `fe4cd5a`.
- [Commits](sota-zk-labs/ionia@3a15977...fe4cd5a)

---
updated-dependencies:
- dependency-name: ionia
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: Aptos Da Client

* feat: Data Submission Worker Integration. (madara-alliance#51)

* update: DA job draft #1

* docs: changelog updated

* update: is_worker_enabled impl & usage in da_submission, removal of String from VerificationFailed

* update: renamed  to

* update: run worker only if it's enabled using is_worker_enabled check

* build: linter fixes

* Update CHANGELOG.md

Co-authored-by: Apoorv Sadana <[email protected]>

* update: limit_to_one on get_jobs_by_status

* update: removed get_last_successful_job_by_type, added get_latest_job_by_type_and_status

* update: added error to job metadata

* update: pr resolution, simplifying get_jobs_by_status, rejected status in verify_jobs

* update: linting fixes

* Update crates/orchestrator/src/jobs/mod.rs

Co-authored-by: Apoorv Sadana <[email protected]>

* update: removing .expect from mongodb mod file

* update: fixed testcase for snos worker

* chore: correct variable name

* update: added support to check againt multiple status - is_worker_enabled, get_jobs_by_statuses

* docs: rewrote 1 job per block assumption

* docs: DataSubmissionWorker -> DataAvailabilitySynchronizer

* chore: liniting fix

* update: changed name : DataAvailabilitySynchronizer -> DataSubmissionWorker

---------

Co-authored-by: Apoorv Sadana <[email protected]>

* Feat : add testing fixtures and a basic test (madara-alliance#52)

* feat : added tests for increasing coverage

* feat : added mongo db tests and fixtures and updated the ci for tests

* update : removed unwanted fixtures

* update : removed unwanted fixtures

* update : added mongo db runner in ci

* update : added mongo db runner in ci

* update : added mongo db runner in ci

* update : updated with new changes and ci

* update : updated test cases for s3 client

* update : added .env.test file in the commit

* feat : added database necessary tests

* feat : added database necessary tests

* Revert "feat : added database necessary tests"

This reverts commit 65d66e6.

* Revert "feat : added database necessary tests"

This reverts commit 906a1eb.

* update: Replaced Build_Config Fixture with TestConfigBuilder

* update : config update

* update : test_put_and_get_data_s3 test

* update: moved testconfigbuilder to tests/config.rs & added docs , drop all collections not just jobs

* feat : updated test config and added config type to aws s3 config

* chore: resolved pr comments

* Update crates/orchestrator/src/tests/database/mod.rs

Co-authored-by: 0xevolve <[email protected]>

* feat : lint fix

* fix : coverage tests fix

* fix : test fix

---------

Co-authored-by: Heemank Verma <[email protected]>
Co-authored-by: 0xevolve <[email protected]>

* Feat : job handler tests (madara-alliance#67)

* feat : added tests for increasing coverage

* feat : added mongo db tests and fixtures and updated the ci for tests

* update : removed unwanted fixtures

* update : removed unwanted fixtures

* update : added mongo db runner in ci

* update : added mongo db runner in ci

* update : added mongo db runner in ci

* update : updated with new changes and ci

* update : updated test cases for s3 client

* update : added .env.test file in the commit

* feat : added database necessary tests

* feat : added database necessary tests

* Revert "feat : added database necessary tests"

This reverts commit 65d66e6.

* Revert "feat : added database necessary tests"

This reverts commit 906a1eb.

* update: Replaced Build_Config Fixture with TestConfigBuilder

* update : config update

* update : test_put_and_get_data_s3 test

* update: moved testconfigbuilder to tests/config.rs & added docs , drop all collections not just jobs

* feat : create job test case error returning

* mock job handler

* feat : added jobs test and modified worker tests

* feat : added queue checks to tests and revamped some tests

* feat : updated tests and resolved comments

* feat : updated test config and added config type to aws s3 config

* feat : updated tests and test names

* feat : lint fixes

* feat : lint fixes

* feat : lint fixes

* chore: resolved pr comments

* Update crates/orchestrator/src/tests/database/mod.rs

Co-authored-by: 0xevolve <[email protected]>

* chore : lint fixes

* feat : lint fix

* fix : coverage tests fix

* fix : test fix

* fix : updated region in localstack .env.test

* feat : updated region

* debug : added debug log to github ci

* feat : updated queue code for test fixes

* fix : sqs region fix

* debug : added debug logs for ci debugging

* feat : added override endpoint to queue url in producer and consumer

* feat : added override endpoint to queue url in producer and consumer

* fix : removed logs and refactored the code

* chore : refactor code

---------

Co-authored-by: Heemank Verma <[email protected]>
Co-authored-by: apoorvsadana <[email protected]>
Co-authored-by: 0xevolve <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Steve Nguyen <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Heemank Verma <[email protected]>
Co-authored-by: Apoorv Sadana <[email protected]>
Co-authored-by: Arun Jangra <[email protected]>
Co-authored-by: 0xevolve <[email protected]>
  • Loading branch information
7 people authored Aug 29, 2024
1 parent 7e771e7 commit 806f6be
Show file tree
Hide file tree
Showing 55 changed files with 13,744 additions and 4,118 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = ["--cfg", "tokio_unstable"]
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ SQS_JOB_VERIFICATION_QUEUE_URL=
# S3
AWS_S3_BUCKET_NAME=
AWS_S3_BUCKET_REGION=

#APTOS
APTOS_NODE_URL=
APTOS_PRIVATE_KEY=
APTOS_MODULE_ADDRESS=
APTOS_CHAIN_ID=
APTOS_CRS_PATH=
22 changes: 22 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: true

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- Draply
- 0x5ea000000
- hduoc2003
- zk-steve
- Tranduy1dol
- VanhGer

# A list of keywords to be skipped the process that add reviewers if pull requests include it
skipKeywords:
- wip

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
6 changes: 6 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Check List

- [ ] Don't forget to squash commits into meaningful chunks before merging
- [ ] Check every test passed.
- [ ] Did you split imports into std, third parties, and custom parts?
- [ ] Format your code.
- [ ] cargo fmt
- [ ] cargo clippy
- [ ] `taplo fmt --config taplo/taplo.toml`
- [ ] Check unwrap, expect().
- [ ] Check clone().
- [ ] Check your commit messages.
- [ ] Have you added meaningful comments.
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- name: Run llvm-cov
run: |
sudo apt install build-essential cmake pkg-config libudev-dev
cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1
- name: Coveralls
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/linters-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Format and clippy
run: |
cargo fmt -- --check
cargo clippy --no-deps -- -D warnings
cargo clippy --tests --no-deps -- -D warnings
sudo apt install build-essential cmake pkg-config libudev-dev
RUSTFLAGS="--cfg tokio_unstable" cargo fmt -- --check
RUSTFLAGS="--cfg tokio_unstable" cargo clippy --no-deps -- -D warnings
RUSTFLAGS="--cfg tokio_unstable" cargo clippy --tests --no-deps -- -D warnings
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Workflow - Pull Request
on:
workflow_dispatch:
pull_request:
branches: [main]
branches: [aptos]
push:
branches: [main]
branches: [aptos]

jobs:
linters:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:

- name: Build the project
run: |
cargo build --release --workspace
sudo apt install build-essential cmake pkg-config libudev-dev
RUSTFLAGS="--cfg tokio_unstable" cargo build --release --workspace
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ionia"]
path = ionia
url = [email protected]:sota-zk-labs/ionia.git
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- Tests for DA job.
- Added generalized errors for Jobs : JobError.
- Database tests
- Aptos DA client, Aptos-compatible workflow.

## Changed

- GitHub's coverage CI yml file for localstack and db testing.
- Orchestrator :Moved TestConfigBuilder to `config.rs` in tests folder.
- `.env` file requires two more variables which are queue urls for processing
and verification.
- Shifted Unit tests to test folder for DA job.

## Removed

- `fetch_from_test` argument

## Fixed

-
- Fixed state update worker logic as per the new implementation.
Loading

0 comments on commit 806f6be

Please sign in to comment.