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

Fixing a nonce conflict issue when the cached nonce expired. #99

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

Chengxuan
Copy link
Contributor

There is a problem when two different batches of transaction inserts happen in parallel, one of them will read the incorrect nonce back from the DB + the nonce callback when the cached nonce expires.

The fix in the PR is to check the expired cached nonce first to avoid pending transactions that have clashing nonces between them.

Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
@nguyer nguyer merged commit 7b03729 into hyperledger:main Aug 2, 2023
2 checks passed
@Chengxuan Chengxuan deleted the nonce-state-timeout-fix branch August 2, 2023 15:25
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.

2 participants