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

conservative cache: allow nonce gap in mempool #3402

Closed
Tracked by #150
countvonzero opened this issue Aug 3, 2022 · 0 comments
Closed
Tracked by #150

conservative cache: allow nonce gap in mempool #3402

countvonzero opened this issue Aug 3, 2022 · 0 comments
Assignees

Comments

@countvonzero
Copy link
Contributor

Description

tx model (txs/cache.go, txs/conservative_state.go refactoring)

  • logic in applyLayer cannot loop over incremental nonces, this needs to be refactored; it cannot calculate numApplied with simple subtraction. change inequality (validity predicate) to check that tx nonce is >= NextNonce()
  • accountCache.moreInDB: update logic to allow for nonce gaps
@countvonzero countvonzero self-assigned this Aug 4, 2022
bors bot pushed a commit that referenced this issue Aug 5, 2022
## Motivation
<!-- Please mention the issue fixed by this PR or detailed motivation -->
Closes #3401 
Closes #3402
Closes #3389 

## Changes
<!-- Please describe in detail the changes made -->
- in vm relaxes the nonce comparison from `tx.Nonce == acct.NextNonce()` to `tx.Nonce >= acct.NextNonce()`
- in conservative cache
  - use container.List to keep mempool transactions
  - allow nonce gap

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->
unit test, systest
bors bot pushed a commit that referenced this issue Aug 5, 2022
## Motivation
<!-- Please mention the issue fixed by this PR or detailed motivation -->
Closes #3401 
Closes #3402
Closes #3389 

## Changes
<!-- Please describe in detail the changes made -->
- in vm relaxes the nonce comparison from `tx.Nonce == acct.NextNonce()` to `tx.Nonce >= acct.NextNonce()`
- in conservative cache
  - use container.List to keep mempool transactions
  - allow nonce gap

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->
unit test, systest
bors bot pushed a commit that referenced this issue Aug 5, 2022
## Motivation
<!-- Please mention the issue fixed by this PR or detailed motivation -->
Closes #3401 
Closes #3402
Closes #3389 

## Changes
<!-- Please describe in detail the changes made -->
- in vm relaxes the nonce comparison from `tx.Nonce == acct.NextNonce()` to `tx.Nonce >= acct.NextNonce()`
- in conservative cache
  - use container.List to keep mempool transactions
  - allow nonce gap

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->
unit test, systest
bors bot pushed a commit that referenced this issue Aug 5, 2022
## Motivation
<!-- Please mention the issue fixed by this PR or detailed motivation -->
Closes #3401 
Closes #3402
Closes #3389 

## Changes
<!-- Please describe in detail the changes made -->
- in vm relaxes the nonce comparison from `tx.Nonce == acct.NextNonce()` to `tx.Nonce >= acct.NextNonce()`
- in conservative cache
  - use container.List to keep mempool transactions
  - allow nonce gap

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->
unit test, systest
@bors bors bot closed this as completed in d4c11da Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant