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

feat: Data Submission Worker Integration. #51

Merged
merged 23 commits into from
Aug 3, 2024
Merged

Conversation

heemankv
Copy link
Contributor

This PR resolves Issue #37.

Includes creation of multiple data submission jobs together.

Logic :

  • We assume absolute non sequential calls, no need to wait on previous data submission jobs to be completed before triggering for new block.
  • Y : Take last completed Proof Job.
  • X : Take last triggered Data Submission Job.
  • X <= Y
  • Trigger data submission jobs for all Y - X jobs.

@heemankv heemankv added the enhancement New feature or request label Jul 22, 2024
@heemankv heemankv self-assigned this Jul 22, 2024
Copy link
Contributor

@apoorvsadana apoorvsadana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't added test cases for this code

CHANGELOG.md Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/mod.rs Show resolved Hide resolved
crates/orchestrator/src/workers/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/data_submission.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/snos.rs Show resolved Hide resolved
heemankv and others added 2 commits July 23, 2024 17:17
Co-authored-by: Apoorv Sadana <95699312+apoorvsadana@users.noreply.github.com>
crates/orchestrator/src/database/mongodb/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/database/mongodb/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/snos.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/data_submission.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/data_submission.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/workers/data_submission.rs Outdated Show resolved Hide resolved
@apoorvsadana apoorvsadana merged commit 43db46e into main Aug 3, 2024
7 checks passed
@heemankv heemankv deleted the feat/da_worker branch August 3, 2024 10:42
@heemankv heemankv mentioned this pull request Aug 8, 2024
Tranduy1dol pushed a commit to sota-zk-labs/madara-orchestrator that referenced this pull request Aug 12, 2024
* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>
Tranduy1dol pushed a commit to sota-zk-labs/madara-orchestrator that referenced this pull request Aug 21, 2024
* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>
Tranduy1dol pushed a commit to sota-zk-labs/madara-orchestrator that referenced this pull request Aug 28, 2024
* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>
Tranduy1dol pushed a commit to sota-zk-labs/madara-orchestrator that referenced this pull request Aug 28, 2024
* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>
Tranduy1dol pushed a commit to sota-zk-labs/madara-orchestrator that referenced this pull request Aug 28, 2024
* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>
Tranduy1dol added a commit to sota-zk-labs/madara-orchestrator that referenced this pull request Aug 29, 2024
* 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 <sonntuet1997@gmail.com>

* 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] <support@github.com>
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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <95699312+apoorvsadana@users.noreply.github.com>

* 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 <Artevolve@yahoo.com>

* feat : lint fix

* fix : coverage tests fix

* fix : test fix

---------

Co-authored-by: Heemank Verma <heemankv@gmail.com>
Co-authored-by: 0xevolve <Artevolve@yahoo.com>

* 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 <Artevolve@yahoo.com>

* 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 <heemankv@gmail.com>
Co-authored-by: apoorvsadana <95699312+apoorvsadana@users.noreply.github.com>
Co-authored-by: 0xevolve <Artevolve@yahoo.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Steve Nguyen <sonntuet1997@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Heemank Verma <heemankv@gmail.com>
Co-authored-by: Apoorv Sadana <95699312+apoorvsadana@users.noreply.github.com>
Co-authored-by: Arun Jangra <arunjangra1001@gmail.com>
Co-authored-by: 0xevolve <Artevolve@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants