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

[WIP] Add invalidated_tx_count to fix cell dep and cell consume issues #4352

Closed

Conversation

chenyukang
Copy link
Collaborator

@chenyukang chenyukang commented Feb 18, 2024

What problem does this PR solve?

Problem Summary:

The are conflicts rule between cell dep reference and cell consume relationships.

Assume there are 3 transactions, B cell dep A(and there may be many transactions also cell dep A), C consumes A.

  • If C is committed first, B and all other transactions will be invalidated.
  • If there are too many transactions all cell dep A, transaction C can not be submitted to txpool.

What is changed and how it works?

In this PR, we introduce these changes:

  • add a new invalidated_tx_count to Entry, marked as how many transactions will be invalidated if by this transaction entry.
  • Add invalidators to store all transactions which may invalidate the current transaction
  • Remove DirectParents and direct_ancestors_count, it's now replaced by Parents and ancestors_count
  • Fix order based on the relationships of invalidators and parents.

What's Changed:

Related changes

  • PR to update owner/repo:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • Performance regression
  • Breaking backward compatibility

Release note

Title Only: Include only the PR title in the release note.

@chenyukang chenyukang requested a review from a team as a code owner February 18, 2024 06:06
@chenyukang chenyukang requested review from quake and removed request for a team February 18, 2024 06:06
@chenyukang
Copy link
Collaborator Author

deprecated this solution since it's complex.

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.

1 participant