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

Cleanup inactive transactions in non-validator #742

Merged

Conversation

Kourin1996
Copy link
Contributor

@Kourin1996 Kourin1996 commented Sep 20, 2022

Fix EDGE-843

Description

This PR adds a function to remove the transactions that have not been adopted for a certain number of transactions.
And also this PR disable --seal flag but keep CLI flag because this PR is intended to be merged in the next PATCH release

Relevant: #731

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

  1. Send the multiple transactions with consecutive nonces to non-validator node so that validators process the first part of transactions and fail to include the second part of the transactions (e.g. Send the bigger amount than the value account holds in a multiple transactions)
  2. Make sure there are pending transactions in TxPool of validator and non-validator
  3. Make sure the first part of the transactions are processed
  4. Wait for a while
  5. Make sure there are no transactions in TxPool of validator and non-validator

Documentation update

Please link the documentation update PR in this section if it's present, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@Kourin1996 Kourin1996 added the bug fix Functionality that fixes a bug label Sep 20, 2022
@Kourin1996 Kourin1996 self-assigned this Sep 20, 2022
@Kourin1996 Kourin1996 changed the base branch from develop to release/0.5.1 September 20, 2022 14:22
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

❗ No coverage uploaded for pull request base (release/0.5.1@1d6ba17). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             release/0.5.1     #742   +/-   ##
================================================
  Coverage                 ?   49.05%           
================================================
  Files                    ?      112           
  Lines                    ?    15529           
  Branches                 ?        0           
================================================
  Hits                     ?     7618           
  Misses                   ?     7274           
  Partials                 ?      637           

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

@Kourin1996 Kourin1996 force-pushed the feature/cleanup-inactive-accounts-transaction branch from f25e2c4 to 78a3e07 Compare September 20, 2022 14:42
txpool/txpool.go Outdated Show resolved Hide resolved
txpool/account.go Outdated Show resolved Hide resolved
txpool/txpool.go Outdated Show resolved Hide resolved
txpool/txpool.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dbrajovic dbrajovic left a comment

Choose a reason for hiding this comment

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

Already looks good, just need to resolve the updateUnadoptedCounts detail 👍

@Kourin1996 Kourin1996 merged commit 06d3f72 into release/0.5.1 Sep 22, 2022
@Kourin1996 Kourin1996 deleted the feature/cleanup-inactive-accounts-transaction branch September 22, 2022 11:27
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants