Skip to content

Conversation

@wanwiset25
Copy link
Collaborator

Proposed changes

Implement and use deep copies in PoolObj methods to prevent data race and optimize sync locks

ref audit ticket: XFN-04

Types of changes

What types of changes does your code introduce to XDC network?
Put an in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Regular KTLO or any of the maintaince work. e.g code style
  • CICD Improvement

Impacted Components

Which part of the codebase this PR will touch base on,

Put an in the boxes that apply

  • Consensus
  • Account
  • Network
  • Geth
  • Smart Contract
  • External components
  • Not sure (Please specify below)

Checklist

Put an in the boxes once you have confirmed below actions (or provide reasons on not doing so) that

  • This PR has sufficient test coverage (unit/integration test) OR I have provided reason in the PR description for not having test coverage
  • Provide an end-to-end test plan in the PR description on how to manually test it on the devnet/testnet.
  • Tested the backwards compatibility.
  • Tested with XDC nodes running this version co-exist with those running the previous version.
  • Relevant documentation has been updated as part of this PR
  • N/A

This was referenced Nov 2, 2025
@gzliudan gzliudan changed the title consensus: implement DeepCopy() in PoolObj consensus: implement DeepCopy() in PoolObj, close XFN-04 Nov 2, 2025
@wanwiset25 wanwiset25 requested a review from gzliudan November 2, 2025 18:39
Copy link
Collaborator

@gzliudan gzliudan left a comment

Choose a reason for hiding this comment

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

LGTM

@wanwiset25 wanwiset25 merged commit 7aaa541 into dev-upgrade Nov 10, 2025
24 checks passed
@wanwiset25 wanwiset25 deleted the XFN-04-v3 branch November 10, 2025 17:56
benjamin202410 pushed a commit that referenced this pull request Nov 18, 2025
* add DeepCopy() for PoolObj

* PoolObj: use deepcopies and optimize locks

* optimize code
benjamin202410 pushed a commit that referenced this pull request Nov 27, 2025
* add DeepCopy() for PoolObj

* PoolObj: use deepcopies and optimize locks

* optimize code
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