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

Abstract away DB in AtxBuilder #6356

Merged
merged 10 commits into from
Oct 29, 2024

Conversation

poszu
Copy link
Contributor

@poszu poszu commented Sep 26, 2024

Motivation

Step 1 of the Activation Service PoC #6354

Description

Abstract away accesses to the state DB in the ATX builder by using a AtxService interface, which provides access to:

  • the last ATX of the identity,
  • a fresh positioning ATX,
  • any ATX requested by ATXID.

Blobs of the built ATXs are preserved in a new table in the local DB for re-gossipping them later at the re-gossip intervals.

Test Plan

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 88.48485% with 19 lines in your changes missing coverage. Please review.

Project coverage is 79.7%. Comparing base (fa5c830) to head (2495652).
Report is 30 commits behind head on node-split-poc.

Files with missing lines Patch % Lines
activation/atx_service_db.go 82.2% 10 Missing and 4 partials ⚠️
activation/activation.go 87.8% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           node-split-poc   #6356     +/-   ##
================================================
- Coverage            81.5%   79.7%   -1.9%     
================================================
  Files                 330     330             
  Lines               36368   43031   +6663     
================================================
+ Hits                29664   34311   +4647     
- Misses               4769    6774   +2005     
- Partials             1935    1946     +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

activation/activation.go Outdated Show resolved Hide resolved
activation/activation.go Outdated Show resolved Hide resolved
common/errors.go Outdated Show resolved Hide resolved
@poszu poszu requested a review from jellonek as a code owner October 7, 2024 10:14
activation/atx_service_db.go Outdated Show resolved Hide resolved
activation/atx_service_db_test.go Outdated Show resolved Hide resolved
activation/validation.go Show resolved Hide resolved
sql/localsql/schema/migrations/0010_atxs.sql Show resolved Hide resolved
activation/activation.go Outdated Show resolved Hide resolved
activation/activation.go Outdated Show resolved Hide resolved
activation/activation.go Outdated Show resolved Hide resolved
@poszu poszu requested review from fasmat, acud and ivan4th October 15, 2024 09:49
@poszu poszu force-pushed the node-split/abstract-db-in-atx-builder branch from 57daffd to 11a68ea Compare October 15, 2024 09:57
@poszu poszu force-pushed the node-split/abstract-db-in-atx-builder branch from 11a68ea to 378063b Compare October 15, 2024 09:59
@poszu poszu changed the base branch from develop to node-split-poc October 29, 2024 14:53
@poszu
Copy link
Contributor Author

poszu commented Oct 29, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Oct 29, 2024
@poszu
Copy link
Contributor Author

poszu commented Oct 29, 2024

bors cancel

@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor

acud commented Oct 29, 2024

bors merge

@spacemesh-bors
Copy link

👎 Rejected by too few approved reviews

@acud
Copy link
Contributor

acud commented Oct 29, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Oct 29, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor

acud commented Oct 29, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Oct 29, 2024
@spacemesh-bors
Copy link

try

Build failed:

@poszu poszu merged commit 4d3321f into node-split-poc Oct 29, 2024
16 checks passed
@poszu poszu deleted the node-split/abstract-db-in-atx-builder branch October 29, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants