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/add recover - part 1 #541

Merged
merged 8 commits into from
Jul 6, 2023
Merged

Feat/add recover - part 1 #541

merged 8 commits into from
Jul 6, 2023

Conversation

jingchen2222
Copy link
Collaborator

@jingchen2222 jingchen2222 commented Jul 3, 2023

Motivation

  • Add recover lib for recover op including recover from given block, fetching mutation from arware, apply mutation if configured, etc

PR-Codex overview

Focus of this PR:

This PR focuses on adding new functionality related to Arweave transaction handling and applying mutations in the codebase.

Detailed summary:

  • Added recover.rs module.
  • Added get_latest_arweave_tx function in MetaStoreClient.
  • Added get_tx_tags and get_start_block functions in ArToolBox.
  • Added apply_mutation function in DBStoreV2.
  • Added relevant imports and dependencies.

The following files were skipped due to too many changes: src/node/src/recover.rs, src/node/src/storage_node_light_impl.rs

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@jingchen2222 jingchen2222 changed the title Feat/add recover Feat/add recover (WIP) Jul 3, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #541 (554943d) into main (cab7f67) will increase coverage by 1.62%.
The diff coverage is 81.13%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #541      +/-   ##
==========================================
+ Coverage   54.37%   55.99%   +1.62%     
==========================================
  Files          71       73       +2     
  Lines       13700    14199     +499     
  Branches       61       61              
==========================================
+ Hits         7449     7951     +502     
+ Misses       6251     6248       -3     
Flag Coverage Δ
rust 55.99% <81.13%> (+1.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/error/src/lib.rs 100.00% <ø> (ø)
src/node/src/rollup_executor.rs 30.94% <57.14%> (+3.79%) ⬆️
src/storage/src/ar_fs.rs 53.65% <65.45%> (+16.70%) ⬆️
src/node/src/ar_toolbox.rs 83.28% <83.28%> (ø)
src/node/src/recover.rs 84.04% <84.04%> (ø)
src/storage/src/meta_store_client.rs 53.08% <100.00%> (+8.80%) ⬆️

... and 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jingchen2222 jingchen2222 changed the title Feat/add recover (WIP) Feat/add recover - part 1 Jul 6, 2023
Copy link
Contributor

@imotai imotai left a comment

Choose a reason for hiding this comment

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

LGTM

@imotai imotai merged commit 07b3d53 into main Jul 6, 2023
@imotai imotai deleted the feat/add_recover branch July 24, 2023 01:07
@jingchen2222
Copy link
Collaborator Author

@qa-agent

What does that for?

@imotai
Copy link
Contributor

imotai commented Aug 12, 2023

@qa-agent

@dbpunk-labs dbpunk-labs deleted a comment from qa-agent Aug 12, 2023
@imotai
Copy link
Contributor

imotai commented Aug 12, 2023

@qa-agent

What does that for?

I am testing a ai bot to generate the unit test analysis like the following

Unit Test Analysis

🎯level:Important
📣explanation:The pull request modifies the code in the store/document_v2.ts file, which contains important functions for adding and updating documents. It is important to have unit tests for these functions to ensure that they work correctly and handle errors properly.

Existing Test Cases

Summary Category File
Test that the addDoc function can be called successfully. positive testing sdk/tests/client_v2.test.ts
Test that the addDoc function throws an exception for invalid inputs. negative testing sdk/tests/client_v2.test.ts

Recommended Test Cases

Summary Category
Test that the addDoc function works correctly under different edge cases, such as null inputs, empty inputs, and large inputs. edge testing

@qa-agent
Copy link

Unit Test Analysis

🎯level:Important
📣explanation:The pull request introduces changes to the DBStoreV2 and MetaStoreClient modules, which are critical components of the system. It is important to ensure that the changes do not introduce any bugs or regressions, and that the existing functionality continues to work as expected.

Existing Test Cases

Summary Category File

Recommended Test Cases

Summary Category

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants